File tree Expand file tree Collapse file tree 8 files changed +6832
-15
lines changed Expand file tree Collapse file tree 8 files changed +6832
-15
lines changed Original file line number Diff line number Diff line change 1+ # Javascript Node CircleCI 2.0 configuration file
2+ #
3+ # Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+ #
5+ version : 2.1
6+ jobs :
7+ build :
8+ docker :
9+ # - image: circleci/node:8.9.4
10+ - image : circleci/node:8.16.0
11+
12+ working_directory : ~/project
13+
14+ steps :
15+ - checkout
16+
17+ # Download and cache dependencies
18+ - restore_cache :
19+ keys :
20+ - deps-{{ checksum "package-lock.json" }}
21+ # fallback to using the latest cache if no exact match is found
22+ - deps-
23+
24+ - run : npm install
25+
26+ - save_cache :
27+ paths :
28+ - frontend/node_modules
29+ key : deps-{{ checksum "package-lock.json" }}
30+
31+ # run tests
32+ - run : npm run test-node
33+ # run lint
34+ - run : npm run jshint
Original file line number Diff line number Diff line change 11{
22 "curly" : true ,
33 "latedef" : true ,
4- "quotmark" : true ,
54 "undef" : true ,
65 "unused" : true ,
76 "trailing" : true ,
Original file line number Diff line number Diff line change 1- var attrRE = / \s ( [ ^ ' " / \s > < ] + ?) [ \s / > ] | ( [ ^ \s = ] + ) = \s ? ( " .* ?" | ' .* ?' ) / g
1+ var attrRE = / \s ( [ ^ ' " / \s > < ] + ?) [ \s / > ] | ( [ ^ \s = ] + ) = \s ? ( " .* ?" | ' .* ?' ) / g;
22
33// create optimized lookup object for
44// void elements as listed here:
@@ -30,40 +30,45 @@ module.exports = function (tag) {
3030 children : [ ]
3131 } ;
3232
33- let tagMatch = tag . match ( / < \/ ? ( [ ^ \s ] + ?) [ / \s > ] / )
33+ var tagMatch = tag . match ( / < \/ ? ( [ ^ \s ] + ?) [ / \s > ] / ) ;
3434 if ( tagMatch )
3535 {
3636 res . name = tagMatch [ 1 ] ;
37- if ( lookup [ tagMatch [ 1 ] . toLowerCase ( ) ] || tag . charAt ( tag . length - 2 ) === '/' )
37+ if ( lookup [ tagMatch [ 1 ] . toLowerCase ( ) ] || tag . charAt ( tag . length - 2 ) === '/' ) {
3838 res . voidElement = true ;
39+ }
3940
4041 }
4142
42- let reg = new RegExp ( attrRE )
43- let result = null ;
43+ var reg = new RegExp ( attrRE ) ;
44+ var result = null ;
4445 for ( ; ; )
4546 {
4647 result = reg . exec ( tag ) ;
4748
48- if ( result === null )
49+ if ( result === null ) {
4950 break ;
51+ }
5052
51- if ( ! result [ 0 ] . trim ( ) )
53+ if ( ! result [ 0 ] . trim ( ) ) {
5254 continue ;
55+ }
5356
5457 if ( result [ 1 ] )
5558 {
56- let attr = result [ 1 ] . trim ( ) ;
57- let arr = [ attr , "" ] ;
59+ var attr = result [ 1 ] . trim ( ) ;
60+ var arr = [ attr , '' ] ;
5861
59- if ( attr . indexOf ( "=" ) > - 1 )
60- arr = attr . split ( "=" ) ;
62+ if ( attr . indexOf ( '=' ) > - 1 ) {
63+ arr = attr . split ( '=' ) ;
64+ }
6165
6266 res . attrs [ arr [ 0 ] ] = arr [ 1 ] ;
6367 reg . lastIndex -- ;
6468 }
65- else if ( result [ 2 ] )
69+ else if ( result [ 2 ] ) {
6670 res . attrs [ result [ 2 ] ] = result [ 3 ] . trim ( ) . substring ( 1 , result [ 3 ] . length - 1 ) ;
71+ }
6772 }
6873
6974 return res ;
Original file line number Diff line number Diff line change 11/*jshint -W030 */
2- var tagRE = / < (?: " [ ^ " ] * " [ ' " ] * | ' [ ^ ' ] * ' [ ' " ] * | [ ^ ' " > ] ) + > / g;
2+ var tagRE = / < [ a - z A - Z \- \! \/ ] (?: " [ ^ " ] * " [ ' " ] * | ' [ ^ ' ] * ' [ ' " ] * | [ ^ ' " > ] ) * > / g;
3+
34var parseTag = require ( './parse-tag' ) ;
45// re-used obj for quick lookups of components
56var empty = Object . create ? Object . create ( null ) : { } ;
You can’t perform that action at this time.
0 commit comments