File tree Expand file tree Collapse file tree 7 files changed +3955
-48
lines changed
Expand file tree Collapse file tree 7 files changed +3955
-48
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+ name : Node.js CI
5+
6+ on :
7+ push :
8+ branches : [master]
9+ pull_request :
10+ branches : [master]
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ strategy :
17+ matrix :
18+ node-version : [12.x, 14.x]
19+
20+ steps :
21+ - uses : actions/checkout@v2.3.3
22+ - name : Use Node.js ${{ matrix.node-version }}
23+ uses : actions/setup-node@v1.4.4
24+ with :
25+ node-version : ${{ matrix.node-version }}
26+ - name : Use cached node_modules
27+ id : cache
28+ uses : actions/cache@v2.1.1
29+ with :
30+ path : node_modules
31+ key : nodeModules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.node-version }}
32+ restore-keys : |
33+ nodeModules-
34+ - name : Install dependencies
35+ if : steps.cache.outputs.cache-hit != 'true'
36+ run : npm install
37+ env :
38+ CI : true
39+ - run : npm run prepublishOnly
40+ - run : npm test
41+ env :
42+ CI : true
Original file line number Diff line number Diff line change 22node_modules
33package-lock.json
44/demo /out
5+ coverage /
Original file line number Diff line number Diff line change 1515 "trailingComma" : " es5"
1616 },
1717 "scripts" : {
18+ "test" : " jest" ,
1819 "dev" : " next dev demo" ,
1920 "build" : " next build demo" ,
2021 "export" : " next export demo" ,
3435 "cssnano" : " ^4.1.10" ,
3536 "dedent" : " ^0.7.0" ,
3637 "highlight.js" : " ^9.15.6" ,
38+ "jest" : " ^26.6.1" ,
3739 "next" : " ^9.4.4" ,
3840 "postcss" : " ^7.0.17" ,
39- "react " : " ^16.8.6 " ,
41+ "prettier " : " ^2.1.2 " ,
4042 "react-dom" : " ^16.8.6" ,
43+ "react" : " ^16.8.6" ,
44+ "snapshot-diff" : " ^0.8.1" ,
4145 "tailwindcss" : " ^2.0.0-alpha.1"
4246 }
4347}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const computed = {
1010
1111function configToCss ( config ) {
1212 return merge (
13+ { } ,
1314 ...Object . keys ( config )
1415 . filter ( ( key ) => computed [ key ] )
1516 . map ( ( key ) => computed [ key ] ( config [ key ] ) ) ,
@@ -26,18 +27,20 @@ module.exports = plugin.withOptions(
2627 [
2728 {
2829 [ `.${ className } ` ] : merge (
29- ...castArray ( styles . default . css ) ,
30- configToCss ( config . default || { } )
30+ { } ,
31+ ...castArray ( styles . DEFAULT . css ) ,
32+ configToCss ( config . DEFAULT || { } )
3133 ) ,
3234 } ,
3335 ...modifiers . map ( ( modifier ) => ( {
3436 [ `.${ className } -${ modifier } ` ] : merge (
37+ { } ,
3538 ...castArray ( styles [ modifier ] . css ) ,
3639 configToCss ( config [ modifier ] || { } )
3740 ) ,
3841 } ) ) ,
3942 ...Object . keys ( config )
40- . filter ( ( key ) => ! [ 'default ' , ...modifiers ] . includes ( key ) )
43+ . filter ( ( key ) => ! [ 'DEFAULT ' , ...modifiers ] . includes ( key ) )
4144 . map ( ( modifier ) => ( {
4245 [ `.${ className } -${ modifier } ` ] : configToCss ( config [ modifier ] ) ,
4346 } ) ) ,
You can’t perform that action at this time.
0 commit comments