File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { parse } from 'shell-quote' ;
22
33export default class Script {
4- constructor ( name , raw ) {
4+ constructor ( name , raw , meta = { } ) {
55 this . name = name ;
66 this . raw = raw ;
7+ this . meta = meta ;
78 this . parsed = parse ( raw ) ;
89 this . canSpawn = this . parsed . reduce ( ( can , op ) => can && typeof op === 'string' , true ) ;
910 }
Original file line number Diff line number Diff line change @@ -28,18 +28,18 @@ export default class Parse extends Plugin {
2828 if ( options . suffixes && options . suffixes . length ) {
2929 suffix = ` ${ options . suffixes . join ( ' ' ) } ` ;
3030 }
31- const main = new Script ( key , scripts [ key ] + suffix ) ;
31+ const main = new Script ( key , scripts [ key ] + suffix , { suffix } ) ;
3232
3333 const preKey = `pre${ key } ` ;
3434 let pre ;
3535 if ( scripts [ preKey ] ) {
36- pre = new Script ( preKey , scripts [ preKey ] + suffix ) ;
36+ pre = new Script ( preKey , scripts [ preKey ] + suffix , { suffix } ) ;
3737 }
3838
3939 const postKey = `post${ key } ` ;
4040 let post ;
4141 if ( scripts [ postKey ] ) {
42- post = new Script ( postKey , scripts [ postKey ] + suffix ) ;
42+ post = new Script ( postKey , scripts [ postKey ] + suffix , { suffix } ) ;
4343 }
4444
4545 return { pre, main, post } ;
You can’t perform that action at this time.
0 commit comments