support for both gulp and npm/tsc runners

This commit is contained in:
Denys Vuika 2016-04-22 14:07:10 +01:00
parent db34fd395d
commit 56b7a361ce
4 changed files with 36 additions and 3 deletions

View File

@ -25,7 +25,16 @@ gulp.task('copy:assets', ['clean'], function() {
// copy dependencies // copy dependencies
gulp.task('copy:libs', ['clean'], function() { gulp.task('copy:libs', ['clean'], function() {
return gulp.src([ 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')) .pipe(gulp.dest('dist/node_modules'))
}); });
@ -75,7 +84,7 @@ gulp.task('serve', ['build'], function() {
gulp.watch(['app/**/*', 'index.html'], ['buildAndReload']); 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('dev', ['build', 'serve'], reload);
gulp.task('default', ['build']); gulp.task('default', ['build']);
gulp.task('buildAndReload', ['build'], reload); gulp.task('buildAndReload', ['build'], reload);

View File

@ -8,7 +8,7 @@
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" ", "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
"test": "live-server --open=tests-runner.html", "test": "live-server --open=tests-runner.html",
"tsc": "tsc", "tsc": "tsc",
"tsc:w": "tsc -w", "tsc:w": "tsc -w -p tsconfig.dev.json",
"lite": "lite-server", "lite": "lite-server",
"typings": "typings", "typings": "typings",
"postinstall": "typings install" "postinstall": "typings install"

View File

@ -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"
]
}

View File

@ -1,6 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"outDir": "dist/app",
"module": "system", "module": "system",
"moduleResolution": "node", "moduleResolution": "node",
"sourceMap": true, "sourceMap": true,
@ -9,6 +10,11 @@
"removeComments": false, "removeComments": false,
"noImplicitAny": false "noImplicitAny": false
}, },
"files": [
"node_modules/angular2/typings/browser.d.ts",
"typings/browser/ambient/jasmine/index.d.ts",
"app/**/*.ts"
],
"exclude": [ "exclude": [
"node_modules", "node_modules",
"typings/main", "typings/main",