@@ -284,6 +284,17 @@ gulp.task('build', ['clean'], (cb) => {
284
284
runSequence ( 'compile' , 'npm-package' , 'rollup-bundle' , cb ) ;
285
285
} ) ;
286
286
287
+ gulp . task ( 'build:schematics' , ( ) => {
288
+ // return execDemoCmd(`build --preserve-symlinks --prod --aot --build-optimizer`, {cwd: `${config.demoDir}`});
289
+ return execCmd ( 'tsc' , '-p src/schematics/tsconfig.json' ) . then ( exitCode => {
290
+ if ( exitCode === 0 ) {
291
+ return execCmd ( 'webpack' , '--config src/schematics/webpack.config.js --progress --colors' ) ;
292
+ } else {
293
+ Promise . reject ( 1 ) ;
294
+ }
295
+ } ) ;
296
+ } ) ;
297
+
287
298
// Same as 'build' but without cleaning temp folders (to avoid breaking demo app, if currently being served)
288
299
gulp . task ( 'build-watch' , ( cb ) => {
289
300
runSequence ( 'compile' , 'test' , 'npm-package' , 'rollup-bundle' , cb ) ;
@@ -310,10 +321,10 @@ gulp.task('build:watch-fast', ['build-watch-no-tests'], () => {
310
321
/////////////////////////////////////////////////////////////////////////////
311
322
312
323
// Prepare 'dist' folder for publication to NPM
313
- gulp . task ( 'npm-package' , ( cb ) => {
324
+ gulp . task ( 'npm-package' , [ 'build:schematics' ] , ( cb ) => {
314
325
let pkgJson = JSON . parse ( fs . readFileSync ( './package.json' , 'utf8' ) ) ;
315
326
let targetPkgJson = { } ;
316
- let fieldsToCopy = [ 'version' , 'description' , 'keywords' , 'author' , 'repository' , 'license' , 'bugs' , 'homepage' ] ;
327
+ let fieldsToCopy = [ 'version' , 'description' , 'keywords' , 'author' , 'repository' , 'license' , 'bugs' , 'homepage' , 'schematics' ] ;
317
328
318
329
targetPkgJson [ 'name' ] = config . libraryName ;
319
330
@@ -503,8 +514,7 @@ gulp.task('serve:doc', ['clean:doc'], (cb) => {
503
514
const execDemoCmd = ( args , opts ) => {
504
515
if ( fs . existsSync ( `${ config . demoDir } /node_modules` ) ) {
505
516
return execCmd ( 'ng' , args , opts , `/${ config . demoDir } ` ) ;
506
- }
507
- else {
517
+ } else {
508
518
gulpUtil . log ( gulpUtil . colors . yellow ( `No 'node_modules' found in '${ config . demoDir } '. Installing dependencies for you...` ) ) ;
509
519
return helpers . installDependencies ( { cwd : `${ config . demoDir } ` } )
510
520
. then ( exitCode => exitCode === 0 ? execCmd ( 'ng' , args , opts , `/${ config . demoDir } ` ) : Promise . reject ( ) )
@@ -671,8 +681,7 @@ gulp.task('release', (cb) => {
671
681
if ( ! readyToRelease ( ) ) {
672
682
gulpUtil . log ( gulpUtil . colors . red ( '# Pre-Release Checks have failed. Please fix them and try again. Aborting...' ) ) ;
673
683
cb ( ) ;
674
- }
675
- else {
684
+ } else {
676
685
gulpUtil . log ( gulpUtil . colors . green ( '# Pre-Release Checks have succeeded. Continuing...' ) ) ;
677
686
runSequence (
678
687
'bump-version' ,
0 commit comments