@@ -271,6 +271,7 @@ gulp.task('build', ['clean'], (cb) => {
271271 runSequence ( 'compile' , 'test' , 'npm-package' , 'rollup-bundle' , cb ) ;
272272} ) ;
273273
274+ // Build the schematics in dist
274275gulp . task ( 'build:schematics' , ( ) => {
275276 // return execDemoCmd(`build --preserve-symlinks --prod --aot --build-optimizer`, {cwd: `${config.demoDir}`});
276277 return execCmd ( 'tsc' , '-p src/schematics/tsconfig.json' ) . then ( exitCode => {
@@ -308,10 +309,10 @@ gulp.task('build:watch-fast', ['build-watch-no-tests'], () => {
308309/////////////////////////////////////////////////////////////////////////////
309310
310311// Prepare 'dist' folder for publication to NPM
311- gulp . task ( 'npm-package' , [ 'build:schematics' ] , ( cb ) => {
312+ gulp . task ( 'npm-package' , ( cb ) => {
312313 let pkgJson = JSON . parse ( fs . readFileSync ( './package.json' , 'utf8' ) ) ;
313314 let targetPkgJson = { } ;
314- let fieldsToCopy = [ 'version' , 'description' , 'keywords' , 'author' , 'repository' , 'license' , 'bugs' , 'homepage' ] ;
315+ let fieldsToCopy = [ 'version' , 'description' , 'keywords' , 'author' , 'repository' , 'license' , 'bugs' , 'homepage' , 'schematics' ] ;
315316
316317 targetPkgJson [ 'name' ] = config . libraryName ;
317318
@@ -656,7 +657,7 @@ gulp.task('create-new-tag', (cb) => {
656657} ) ;
657658
658659// Build and then Publish 'dist' folder to NPM
659- gulp . task ( 'npm-publish' , [ 'build' ] , ( ) => {
660+ gulp . task ( 'npm-publish' , [ 'build' , 'build:schematics' ] , ( ) => {
660661 return execExternalCmd ( 'npm' , `publish ${ config . outputDir } --access public` )
661662} ) ;
662663
0 commit comments