File tree 8 files changed +45
-46
lines changed
8 files changed +45
-46
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {
2
+ "env" : {
3
+ "browser" : true ,
4
+ "commonjs" : true ,
5
+ "es6" : true ,
6
+ "node" : true
7
+ },
8
+ "extends" : " eslint:recommended" ,
9
+ "parserOptions" : {
10
+ "ecmaVersion" : 2018
11
+ }
12
+ }
Original file line number Diff line number Diff line change 1
1
node_modules
2
2
coverage
3
+ .nyc_output
4
+ package-lock.json
Original file line number Diff line number Diff line change 1
- sudo : false
2
1
language : node_js
2
+
3
3
node_js :
4
- - " 0.10"
5
- - " 0.12"
6
- - " iojs"
7
- script : npm run travis
4
+ - 10
5
+ - 12
6
+ - 13
8
7
9
- before_install :
10
- - ' [ "${TRAVIS_NODE_VERSION}" != "0.10" ] || npm install -g npm'
8
+ script : npm run cover
11
9
12
10
after_success :
13
- - cat ./coverage/lcov.info | node_modules/.bin/ coveralls --verbose
14
- - cat ./coverage/coverage.json | node_modules/ codecov.io/bin/codecov.io.js
15
- - rm -rf ./coverage
11
+ - npm run report: coveralls
12
+ - npm run report: codecov
13
+
Original file line number Diff line number Diff line change 1
- # CSS Modules: CSS selector Tokenizer
1
+ # CSS Modules: css-selector-tokenizer
2
+ [ ![ Build Status] ( https://travis-ci.org/css-modules/css-selector-tokenizer.svg?branch=master )] ( https://travis-ci.org/css-modules/css-selector-tokenizer )
3
+ [ ![ coveralls.io] ( https://coveralls.io/repos/css-modules/css-selector-tokenizer/badge.svg?branch=master )] ( https://coveralls.io/r/css-modules/css-selector-tokenizer?branch=master )
4
+ [ ![ codecov.io] ( https://codecov.io/github/css-modules/css-selector-tokenizer/coverage.svg?branch=master )] ( https://codecov.io/github/css-modules/css-selector-tokenizer?branch=master )
2
5
3
6
Parses and stringifies CSS selectors.
4
7
@@ -71,14 +74,9 @@ npm install
71
74
npm test
72
75
```
73
76
74
- [ ![ Build Status] ( https://travis-ci.org/css-modules/css-selector-tokenizer.svg?branch=master )] ( https://travis-ci.org/css-modules/css-selector-tokenizer )
75
-
76
- * Lines: [ ![ Coverage Status] ( https://coveralls.io/repos/css-modules/css-selector-tokenizer/badge.svg?branch=master )] ( https://coveralls.io/r/css-modules/css-selector-tokenizer?branch=master )
77
- * Statements: [ ![ codecov.io] ( http://codecov.io/github/css-modules/css-selector-tokenizer/coverage.svg?branch=master )] ( http://codecov.io/github/css-modules/css-selector-tokenizer?branch=master )
78
-
79
77
## Development
80
78
81
- - ` npm autotest ` will watch ` lib ` and ` test ` for changes and retest
79
+ - ` npm test -- -w ` will watch ` lib ` and ` test ` for changes and retest
82
80
83
81
## License
84
82
Original file line number Diff line number Diff line change @@ -136,12 +136,12 @@ var parser = new Parser({
136
136
"url\\((\\s*)(\"(?:[^\\\\\"]|\\\\.)*\")(\\s*)\\)" : urlMatch ,
137
137
"url\\((\\s*)('(?:[^\\\\']|\\\\.)*')(\\s*)\\)" : urlMatch ,
138
138
"url\\((\\s*)((?:[^\\\\)'\"]|\\\\.)*)(\\s*)\\)" : urlMatch ,
139
- "([\\w\ -]+)\\((\\s*)" : nestedItemMatch ,
139
+ "([\\w-]+)\\((\\s*)" : nestedItemMatch ,
140
140
"(\\s*)(\\))" : nestedItemEndMatch ,
141
141
",(\\s*)" : commaMatch ,
142
142
"\\s+$" : endSpacingMatch ,
143
143
"\\s+" : spacingMatch ,
144
- "[^\\s,\ )]+" : itemMatch
144
+ "[^\\s,)]+" : itemMatch
145
145
}
146
146
} ) ;
147
147
Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
3
- var stringify ;
4
-
5
3
var regexpu = require ( "regexpu-core" ) ;
6
4
var identifierEscapeRegexp = new RegExp (
7
- regexpu ( "(^[^A-Za-z_\\-\\u{00a0}-\\u{10ffff}]|^\\-\\ -|[^A-Za-z_0-9\\-\\u{00a0}-\\u{10ffff}])" , "ug" ) ,
5
+ regexpu ( "(^[^A-Za-z_\\-\\u{00a0}-\\u{10ffff}]|^- -|[^A-Za-z_0-9\\-\\u{00a0}-\\u{10ffff}])" , "ug" ) ,
8
6
"g"
9
7
) ;
10
8
@@ -15,7 +13,7 @@ function escape(str, identifier) {
15
13
if ( identifier ) {
16
14
return str . replace ( identifierEscapeRegexp , "\\$1" ) ;
17
15
} else {
18
- return str . replace ( / ( ^ [ ^ A - Z a - z _ \\ - ] | ^ \- \ -| [ ^ A - Z a - z _ 0 - 9 \\ - ] ) / g, "\\$1" ) ;
16
+ return str . replace ( / ( ^ [ ^ A - Z a - z _ \\ - ] | ^ - - | [ ^ A - Z a - z _ 0 - 9 \\ - ] ) / g, "\\$1" ) ;
19
17
}
20
18
}
21
19
@@ -53,7 +51,7 @@ function stringifyWithoutBeforeAfter(tree) {
53
51
}
54
52
55
53
56
- stringify = function stringify ( tree ) {
54
+ function stringify ( tree ) {
57
55
var str = stringifyWithoutBeforeAfter ( tree ) ;
58
56
if ( tree . before ) {
59
57
str = tree . before + str ;
@@ -62,6 +60,6 @@ stringify = function stringify(tree) {
62
60
str = str + tree . after ;
63
61
}
64
62
return str ;
65
- } ;
63
+ }
66
64
67
65
module . exports = stringify ;
Original file line number Diff line number Diff line change 4
4
"description" : " Parses and stringifies CSS selectors" ,
5
5
"main" : " lib/index.js" ,
6
6
"scripts" : {
7
- "lint" : " eslint lib " ,
7
+ "lint" : " eslint . " ,
8
8
"pretest" : " npm run lint" ,
9
9
"test" : " mocha" ,
10
- "autotest" : " chokidar lib test -c 'npm test'" ,
11
- "precover" : " npm run lint" ,
12
- "cover" : " istanbul cover node_modules/mocha/bin/_mocha" ,
13
- "travis" : " npm run cover -- --report lcovonly" ,
10
+ "cover" : " nyc npm test" ,
11
+ "report:coveralls" : " nyc report --reporter=text-lcov | coveralls" ,
12
+ "report:codecov" : " nyc report --reporter=text-lcov | codecov --pipe" ,
14
13
"publish-patch" : " npm test && npm version patch && git push && git push --tags && npm publish"
15
14
},
16
15
"repository" : {
31
30
},
32
31
"homepage" : " https://github.com/css-modules/css-selector-tokenizer" ,
33
32
"dependencies" : {
34
- "cssesc" : " ^0.1 .0" ,
35
- "fastparse" : " ^1.1.1 " ,
36
- "regexpu-core" : " ^1.0 .0"
33
+ "cssesc" : " ^3.0 .0" ,
34
+ "fastparse" : " ^1.1.2 " ,
35
+ "regexpu-core" : " ^4.6 .0"
37
36
},
38
37
"devDependencies" : {
39
- "chokidar-cli" : " ^0.2.1" ,
40
- "codecov.io" : " ^0.1.2" ,
41
- "coveralls" : " ^2.11.2" ,
42
- "eslint" : " ^0.21.2" ,
43
- "istanbul" : " ^0.3.14" ,
44
- "mocha" : " ^2.2.5"
38
+ "codecov" : " ^3.6.5" ,
39
+ "coveralls" : " ^3.0.9" ,
40
+ "eslint" : " ^6.8.0" ,
41
+ "mocha" : " ^7.1.0" ,
42
+ "nyc" : " ^15.0.0"
45
43
},
46
44
"directories" : {
47
45
"test" : " test"
You can’t perform that action at this time.
0 commit comments