File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
const path = require ( 'path' ) ;
3
- const checkAndInstallPackage = require ( './utils' ) . checkAndInstallPackage ;
4
- const copyAsync = require ( './utils' ) . copyAsync ;
5
- const wrapAsync = require ( './utils' ) . wrapAsync ;
3
+ const pkg = require ( '../package.json' ) ;
4
+ const {
5
+ checkAndInstallPackage,
6
+ copyAsync,
7
+ wrapAsync,
8
+ writeJsonAsync,
9
+ } = require ( './utils' ) ;
6
10
7
11
const installEdition = ( edition , config ) =>
8
12
wrapAsync ( function * ( ) {
@@ -26,6 +30,17 @@ const installEdition = (edition, config) =>
26
30
path . resolve ( sourceDir , '../' , 'gulpfile.js' )
27
31
) ;
28
32
}
33
+ case '@pattern-lab/edition-node' : {
34
+ const scriptsJSON = {
35
+ 'pl:build' : 'patternlab build --config ./patternlab-config.json' ,
36
+ 'pl:help' : 'patternlab --help' ,
37
+ 'pl:install' : 'patternlab install --config ./patternlab-config.json' ,
38
+ 'pl:serve' : 'patternlab serve --config ./patternlab-config.json' ,
39
+ 'pl:version' : 'patternlab --version' ,
40
+ } ;
41
+ pkg . scripts = Object . assign ( { } , pkg . scripts || { } , scriptsJSON ) ;
42
+ yield writeJsonAsync ( './package.json' , pkg , { spaces : 2 } ) ;
43
+ }
29
44
}
30
45
return config ;
31
46
} ) ;
You can’t perform that action at this time.
0 commit comments