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 2
2
node_modules
3
3
package-lock.json
4
4
/demo /out
5
+ coverage /
Original file line number Diff line number Diff line change 15
15
"trailingComma" : " es5"
16
16
},
17
17
"scripts" : {
18
+ "test" : " jest" ,
18
19
"dev" : " next dev demo" ,
19
20
"build" : " next build demo" ,
20
21
"export" : " next export demo" ,
34
35
"cssnano" : " ^4.1.10" ,
35
36
"dedent" : " ^0.7.0" ,
36
37
"highlight.js" : " ^9.15.6" ,
38
+ "jest" : " ^26.6.1" ,
37
39
"next" : " ^9.4.4" ,
38
40
"postcss" : " ^7.0.17" ,
39
- "react " : " ^16.8.6 " ,
41
+ "prettier " : " ^2.1.2 " ,
40
42
"react-dom" : " ^16.8.6" ,
43
+ "react" : " ^16.8.6" ,
44
+ "snapshot-diff" : " ^0.8.1" ,
41
45
"tailwindcss" : " ^2.0.0-alpha.1"
42
46
}
43
47
}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const computed = {
10
10
11
11
function configToCss ( config ) {
12
12
return merge (
13
+ { } ,
13
14
...Object . keys ( config )
14
15
. filter ( ( key ) => computed [ key ] )
15
16
. map ( ( key ) => computed [ key ] ( config [ key ] ) ) ,
@@ -26,18 +27,20 @@ module.exports = plugin.withOptions(
26
27
[
27
28
{
28
29
[ `.${ className } ` ] : merge (
29
- ...castArray ( styles . default . css ) ,
30
- configToCss ( config . default || { } )
30
+ { } ,
31
+ ...castArray ( styles . DEFAULT . css ) ,
32
+ configToCss ( config . DEFAULT || { } )
31
33
) ,
32
34
} ,
33
35
...modifiers . map ( ( modifier ) => ( {
34
36
[ `.${ className } -${ modifier } ` ] : merge (
37
+ { } ,
35
38
...castArray ( styles [ modifier ] . css ) ,
36
39
configToCss ( config [ modifier ] || { } )
37
40
) ,
38
41
} ) ) ,
39
42
...Object . keys ( config )
40
- . filter ( ( key ) => ! [ 'default ' , ...modifiers ] . includes ( key ) )
43
+ . filter ( ( key ) => ! [ 'DEFAULT ' , ...modifiers ] . includes ( key ) )
41
44
. map ( ( modifier ) => ( {
42
45
[ `.${ className } -${ modifier } ` ] : configToCss ( config [ modifier ] ) ,
43
46
} ) ) ,
You can’t perform that action at this time.
0 commit comments