@@ -271,6 +271,18 @@ gulp.task('build', ['clean'], (cb) => {
271
271
runSequence ( 'compile' , 'test' , 'npm-package' , 'rollup-bundle' , cb ) ;
272
272
} ) ;
273
273
274
+ // Build the schematics in dist
275
+ gulp . task ( 'build:schematics' , ( ) => {
276
+ // return execDemoCmd(`build --preserve-symlinks --prod --aot --build-optimizer`, {cwd: `${config.demoDir}`});
277
+ return execCmd ( 'tsc' , '-p src/schematics/tsconfig.json' ) . then ( exitCode => {
278
+ if ( exitCode === 0 ) {
279
+ return execCmd ( 'webpack' , '--config src/schematics/webpack.config.js --progress --colors' ) ;
280
+ } else {
281
+ Promise . reject ( 1 ) ;
282
+ }
283
+ } ) ;
284
+ } ) ;
285
+
274
286
// Same as 'build' but without cleaning temp folders (to avoid breaking demo app, if currently being served)
275
287
gulp . task ( 'build-watch' , ( cb ) => {
276
288
runSequence ( 'compile' , 'test' , 'npm-package' , 'rollup-bundle' , cb ) ;
@@ -300,7 +312,7 @@ gulp.task('build:watch-fast', ['build-watch-no-tests'], () => {
300
312
gulp . task ( 'npm-package' , ( cb ) => {
301
313
let pkgJson = JSON . parse ( fs . readFileSync ( './package.json' , 'utf8' ) ) ;
302
314
let targetPkgJson = { } ;
303
- let fieldsToCopy = [ 'version' , 'description' , 'keywords' , 'author' , 'repository' , 'license' , 'bugs' , 'homepage' ] ;
315
+ let fieldsToCopy = [ 'version' , 'description' , 'keywords' , 'author' , 'repository' , 'license' , 'bugs' , 'homepage' , 'schematics' ] ;
304
316
305
317
targetPkgJson [ 'name' ] = config . libraryName ;
306
318
@@ -491,8 +503,7 @@ gulp.task('serve:doc', ['clean:doc'], (cb) => {
491
503
const execDemoCmd = ( args , opts ) => {
492
504
if ( fs . existsSync ( `${ config . demoDir } /node_modules` ) ) {
493
505
return execCmd ( 'ng' , args , opts , `/${ config . demoDir } ` ) ;
494
- }
495
- else {
506
+ } else {
496
507
gulpUtil . log ( gulpUtil . colors . yellow ( `No 'node_modules' found in '${ config . demoDir } '. Installing dependencies for you...` ) ) ;
497
508
return helpers . installDependencies ( { cwd : `${ config . demoDir } ` } )
498
509
. then ( exitCode => exitCode === 0 ? execCmd ( 'ng' , args , opts , `/${ config . demoDir } ` ) : Promise . reject ( ) )
@@ -657,7 +668,7 @@ gulp.task('create-new-tag', (cb) => {
657
668
} ) ;
658
669
659
670
// Build and then Publish 'dist' folder to NPM
660
- gulp . task ( 'npm-publish' , [ 'build' ] , ( ) => {
671
+ gulp . task ( 'npm-publish' , [ 'build' , 'build:schematics' ] , ( ) => {
661
672
return execExternalCmd ( 'npm' , `publish ${ config . outputDir } --access public` )
662
673
} ) ;
663
674
@@ -672,8 +683,7 @@ gulp.task('release', (cb) => {
672
683
if ( ! readyToRelease ( ) ) {
673
684
gulpUtil . log ( gulpUtil . colors . red ( '# Pre-Release Checks have failed. Please fix them and try again. Aborting...' ) ) ;
674
685
cb ( ) ;
675
- }
676
- else {
686
+ } else {
677
687
gulpUtil . log ( gulpUtil . colors . green ( '# Pre-Release Checks have succeeded. Continuing...' ) ) ;
678
688
runSequence (
679
689
'bump-version' ,
0 commit comments