From 56b7a361cec6fbbc5763db7d5f93e1fcb75e32b6 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 22 Apr 2016 14:07:10 +0100 Subject: [PATCH] support for both gulp and npm/tsc runners --- demo-shell-ng2/gulpfile.js | 13 +++++++++++-- demo-shell-ng2/package.json | 2 +- demo-shell-ng2/tsconfig.dev.json | 18 ++++++++++++++++++ demo-shell-ng2/tsconfig.json | 6 ++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 demo-shell-ng2/tsconfig.dev.json diff --git a/demo-shell-ng2/gulpfile.js b/demo-shell-ng2/gulpfile.js index dc4018ed2a..674cab02ee 100644 --- a/demo-shell-ng2/gulpfile.js +++ b/demo-shell-ng2/gulpfile.js @@ -25,7 +25,16 @@ gulp.task('copy:assets', ['clean'], function() { // copy dependencies gulp.task('copy:libs', ['clean'], function() { return gulp.src([ - 'node_modules/**/*' + 'node_modules/**/*', + '!node_modules/ng2-alfresco-*{,/**/*}' + ]) + .pipe(gulp.dest('dist/node_modules')) +}); + +gulp.task('copy:components', ['clean'], function() { + return gulp.src([ + '../ng2-components/**/*', + '!../ng2-components/README.md' ]) .pipe(gulp.dest('dist/node_modules')) }); @@ -75,7 +84,7 @@ gulp.task('serve', ['build'], function() { gulp.watch(['app/**/*', 'index.html'], ['buildAndReload']); }); -gulp.task('build', ['tslint', 'copy:assets', 'copy:libs', 'copy:typings', 'compile']); +gulp.task('build', ['tslint', 'copy:assets', 'copy:libs', 'copy:components', 'copy:typings', 'compile']); gulp.task('dev', ['build', 'serve'], reload); gulp.task('default', ['build']); gulp.task('buildAndReload', ['build'], reload); diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index 100b11df61..dfc9a48485 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -8,7 +8,7 @@ "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ", "test": "live-server --open=tests-runner.html", "tsc": "tsc", - "tsc:w": "tsc -w", + "tsc:w": "tsc -w -p tsconfig.dev.json", "lite": "lite-server", "typings": "typings", "postinstall": "typings install" diff --git a/demo-shell-ng2/tsconfig.dev.json b/demo-shell-ng2/tsconfig.dev.json new file mode 100644 index 0000000000..0cd78ac35d --- /dev/null +++ b/demo-shell-ng2/tsconfig.dev.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "system", + "moduleResolution": "node", + "sourceMap": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "removeComments": false, + "noImplicitAny": false + }, + "exclude": [ + "dist", + "node_modules", + "typings/main", + "typings/main.d.ts" + ] +} diff --git a/demo-shell-ng2/tsconfig.json b/demo-shell-ng2/tsconfig.json index 9be71e4c6e..a9ba2d14f1 100644 --- a/demo-shell-ng2/tsconfig.json +++ b/demo-shell-ng2/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "target": "es5", + "outDir": "dist/app", "module": "system", "moduleResolution": "node", "sourceMap": true, @@ -9,6 +10,11 @@ "removeComments": false, "noImplicitAny": false }, + "files": [ + "node_modules/angular2/typings/browser.d.ts", + "typings/browser/ambient/jasmine/index.d.ts", + "app/**/*.ts" + ], "exclude": [ "node_modules", "typings/main",