File tree Expand file tree Collapse file tree
templates/yeoman/src/generator/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class MyGenerator extends yeoman.Base {
3636 this . _answers . namePascalCase = toPascalCase ( answers . name ) ;
3737 this . _answers . projectGuid = uuid . v4 ( ) ;
3838 done ( ) ;
39- } )
39+ } ) ;
4040 }
4141
4242 writing ( ) {
@@ -52,6 +52,26 @@ class MyGenerator extends yeoman.Base {
5252 ) ;
5353 } ) ;
5454 }
55+
56+ installingDeps ( ) {
57+ // Strictly speaking, with DNX, the 'prepare' script runs 'npm install' anyway so we don't really need
58+ // to run it from here. But it will be needed with RC2, and it doesn't make the setup take much longer
59+ // because the second run is almost a no-op, so it's OK to leave it here for now.
60+ this . installDependencies ( {
61+ npm : true ,
62+ bower : false ,
63+ callback : ( ) => {
64+ this . spawnCommandSync ( 'dnu' , [ 'restore' ] ) ;
65+
66+ // With DNX, the 'prepare' script builds the vendor files automatically so the following is not
67+ // required. With RC2 and the 'dotnet' tooling, that won't happen automatically, so the following
68+ // will be required:
69+ // this.spawnCommandSync('./node_modules/.bin/webpack', ['--config', 'webpack.config.vendor.js']);
70+
71+ this . spawnCommandSync ( './node_modules/.bin/webpack' ) ;
72+ }
73+ } ) ;
74+ }
5575}
5676
5777declare var module : any ;
You can’t perform that action at this time.
0 commit comments