File tree 7 files changed +29
-28
lines changed
7 files changed +29
-28
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"eslint.enable" : true ,
3
- "eslint.options" : { "configFile" : " ./.eslintrc.yml" }
3
+ "eslint.options" : { "configFile" : " ./.eslintrc.yml" },
4
+ "search.exclude" : {
5
+ "**/.git" : true ,
6
+ "**/node_modules" : true ,
7
+ "**/bower_components" : true ,
8
+ "**/tmp" : true ,
9
+ "**/lib" : true
10
+ }
4
11
}
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ return /******/ (function(modules) { // webpackBootstrap
97
97
if ( this . bindInputFocusEvents ) this . bindFocusEvents ( ) ;
98
98
self . timeout = setTimeout ( function ( ) {
99
99
// Check if there is some text in the element, if yes start by backspacing the default message
100
- if ( ! self . currentElContent || self . currentElContent . length == 0 ) {
100
+ if ( ! self . currentElContent || self . currentElContent . length === 0 ) {
101
101
self . typewrite ( self . strings [ self . sequence [ self . arrayPos ] ] , self . strPos ) ;
102
102
} else {
103
103
// Start typing
@@ -682,15 +682,13 @@ return /******/ (function(modules) { // webpackBootstrap
682
682
// skip over html tags while typing
683
683
var curChar = curString . substr ( curStrPos ) . charAt ( 0 ) ;
684
684
if ( curChar === '<' || curChar === '&' ) {
685
- var tag = '' ;
686
685
var endTag = '' ;
687
686
if ( curChar === '<' ) {
688
687
endTag = '>' ;
689
688
} else {
690
689
endTag = ';' ;
691
690
}
692
691
while ( curString . substr ( curStrPos + 1 ) . charAt ( 0 ) !== endTag ) {
693
- tag += curChar ;
694
692
curStrPos ++ ;
695
693
if ( curStrPos + 1 > curString . length ) {
696
694
break ;
@@ -707,15 +705,13 @@ return /******/ (function(modules) { // webpackBootstrap
707
705
var curChar = curString . substr ( curStrPos ) . charAt ( 0 ) ;
708
706
// skip over html tags while backspacing
709
707
if ( curChar === '>' || curChar === ';' ) {
710
- var tag = '' ;
711
708
var endTag = '' ;
712
709
if ( curChar === '>' ) {
713
710
endTag = '<' ;
714
711
} else {
715
712
endTag = '&' ;
716
713
}
717
714
while ( curString . substr ( curStrPos - 1 ) . charAt ( 0 ) !== endTag ) {
718
- tag -= curChar ;
719
715
curStrPos -- ;
720
716
if ( curStrPos < 0 ) {
721
717
break ;
Original file line number Diff line number Diff line change 1
1
export default class HTMLParser {
2
-
3
2
typeHtmlChars ( curString , curStrPos , self ) {
4
3
if ( self . contentType !== 'html' ) return curStrPos ;
5
4
// skip over html tags while typing
6
5
const curChar = curString . substr ( curStrPos ) . charAt ( 0 ) ;
7
6
if ( curChar === '<' || curChar === '&' ) {
8
- let tag = '' ;
9
7
let endTag = '' ;
10
8
if ( curChar === '<' ) {
11
9
endTag = '>'
@@ -14,9 +12,10 @@ export default class HTMLParser {
14
12
endTag = ';'
15
13
}
16
14
while ( curString . substr ( curStrPos + 1 ) . charAt ( 0 ) !== endTag ) {
17
- tag += curChar ;
18
15
curStrPos ++ ;
19
- if ( curStrPos + 1 > curString . length ) { break ; }
16
+ if ( curStrPos + 1 > curString . length ) {
17
+ break ;
18
+ }
20
19
}
21
20
curStrPos ++ ;
22
21
}
@@ -28,7 +27,6 @@ export default class HTMLParser {
28
27
const curChar = curString . substr ( curStrPos ) . charAt ( 0 ) ;
29
28
// skip over html tags while backspacing
30
29
if ( curChar === '>' || curChar === ';' ) {
31
- let tag = '' ;
32
30
let endTag = '' ;
33
31
if ( curChar === '>' ) {
34
32
endTag = '<'
@@ -37,15 +35,15 @@ export default class HTMLParser {
37
35
endTag = '&'
38
36
}
39
37
while ( curString . substr ( curStrPos - 1 ) . charAt ( 0 ) !== endTag ) {
40
- tag -= curChar ;
41
38
curStrPos -- ;
42
- if ( curStrPos < 0 ) { break ; }
39
+ if ( curStrPos < 0 ) {
40
+ break ;
41
+ }
43
42
}
44
43
curStrPos -- ;
45
44
}
46
45
return curStrPos ;
47
46
}
48
-
49
47
}
50
48
51
49
export let htmlParser = new HTMLParser ( ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export default class Typed {
17
17
if ( this . bindInputFocusEvents ) this . bindFocusEvents ( ) ;
18
18
self . timeout = setTimeout ( ( ) => {
19
19
// Check if there is some text in the element, if yes start by backspacing the default message
20
- if ( ! self . currentElContent || self . currentElContent . length == 0 ) {
20
+ if ( ! self . currentElContent || self . currentElContent . length === 0 ) {
21
21
self . typewrite ( self . strings [ self . sequence [ self . arrayPos ] ] , self . strPos ) ;
22
22
}
23
23
else {
Original file line number Diff line number Diff line change 1
- import webpack from " webpack" ;
2
- import pkg from " ./package.json" ;
1
+ import webpack from ' webpack' ;
2
+ import pkg from ' ./package.json' ;
3
3
var banner = `
4
4
${ pkg . name } - ${ pkg . description }
5
5
Author: ${ pkg . author }
@@ -10,22 +10,22 @@ var banner = `
10
10
11
11
export default {
12
12
entry : {
13
- Typed : " ./src/typed.js"
13
+ Typed : ' ./src/typed.js'
14
14
} ,
15
15
output : {
16
16
path : __dirname ,
17
17
library : 'Typed' ,
18
- libraryTarget : " umd" ,
18
+ libraryTarget : ' umd' ,
19
19
filename : `typed.js`
20
20
} ,
21
- devtool : " #inline-source-map" ,
21
+ devtool : ' #inline-source-map' ,
22
22
externals : [
23
23
{
24
24
lodash : {
25
- root : "_" ,
26
- commonjs : " lodash" ,
27
- commonjs2 : " lodash" ,
28
- amd : " lodash"
25
+ root : '_' ,
26
+ commonjs : ' lodash' ,
27
+ commonjs2 : ' lodash' ,
28
+ amd : ' lodash'
29
29
}
30
30
}
31
31
] ,
@@ -34,14 +34,14 @@ export default {
34
34
{
35
35
test : / \. j s $ / ,
36
36
exclude : / n o d e _ m o d u l e s / ,
37
- loader : " babel" ,
37
+ loader : ' babel' ,
38
38
query : {
39
39
compact : false
40
40
}
41
41
}
42
42
]
43
43
} ,
44
44
plugins : [
45
- new webpack . BannerPlugin ( banner )
45
+ new webpack . BannerPlugin ( banner )
46
46
]
47
47
} ;
You can’t perform that action at this time.
0 commit comments