From 9ec8123a2c03fbd8e36a82af87ccc3155f879096 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 19 May 2016 12:26:35 +0100 Subject: [PATCH] Demo app project cleanup --- demo-shell-ng2/gulpfile.js | 101 ------------------------------- demo-shell-ng2/package.json | 7 --- demo-shell-ng2/tests-runner.html | 52 ---------------- demo-shell-ng2/tsconfig.dev.json | 18 ------ demo-shell-ng2/tsconfig.json | 7 +-- 5 files changed, 1 insertion(+), 184 deletions(-) delete mode 100644 demo-shell-ng2/gulpfile.js delete mode 100644 demo-shell-ng2/tests-runner.html delete mode 100644 demo-shell-ng2/tsconfig.dev.json diff --git a/demo-shell-ng2/gulpfile.js b/demo-shell-ng2/gulpfile.js deleted file mode 100644 index 86ea74a29b..0000000000 --- a/demo-shell-ng2/gulpfile.js +++ /dev/null @@ -1,101 +0,0 @@ -const gulp = require('gulp'); -const del = require('del'); -const typescript = require('gulp-typescript'); -const tscConfig = require('./tsconfig.json'); -const sourcemaps = require('gulp-sourcemaps'); -const tslint = require('gulp-tslint'); -const browserSync = require('browser-sync'); -const reload = browserSync.reload; -const tsconfig = require('tsconfig-glob'); -const license = require('gulp-license-check'); - -// clean the contents of the distribution directory -gulp.task('clean', function () { - return del('dist/*'); -}); - -gulp.task('license', function () { - return gulp.src('./app/**/*.ts') - .pipe(license({ - path: 'app/license_header.txt', - blocking: false, - logInfo: false, - logError: true - })); -}); - -// copy static assets - i.e. non TypeScript compiled source -gulp.task('copy:assets', ['clean'], function () { - return gulp.src(['app/**/*', - 'index.html', - 'typings.json', - '!app/**/*.ts'], {base: './'}) - .pipe(gulp.dest('dist')) -}); - -// copy dependencies -gulp.task('copy:libs', ['clean'], function () { - return gulp.src([ - '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')) -}); - -// copy typings -gulp.task('copy:typings', ['clean'], function () { - return gulp.src([ - 'typings/**/*' - ]) - .pipe(gulp.dest('dist/typings')) -}); - -// linting -gulp.task('tslint', function () { - return gulp.src('app/**/*.ts') - .pipe(tslint()) - .pipe(tslint.report('verbose')); -}); - - -// TypeScript compile -gulp.task('compile', ['clean'], function () { - return gulp - .src(tscConfig.files) - .pipe(sourcemaps.init()) - .pipe(typescript(tscConfig.compilerOptions)) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest('dist')); -}); - -// update the tsconfig files based on the glob pattern -gulp.task('tsconfig-glob', function () { - return tsconfig({ - configPath: '.', - indent: 2 - }); -}); - -// Run browsersync for development -gulp.task('serve', ['build'], function () { - browserSync({ - server: { - baseDir: 'dist' - } - }); - - gulp.watch(['app/**/*', 'index.html'], ['buildAndReload']); -}); - -gulp.task('build', ['license', '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 92d626c822..c2462a9a02 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -57,14 +57,7 @@ "browser-sync": "^2.10.0", "concurrently": "^2.0.0", "del": "^2.1.0", - "gulp": "^3.9.1", - "gulp-license-check": "^1.0.1", - "gulp-sourcemaps": "^1.6.0", - "gulp-tslint": "^3.6.0", - "gulp-typescript": "^2.8.0", - "jasmine-core": "2.4.1", "lite-server": "^2.2.0", - "tsconfig-glob": "^0.3.3", "typescript": "^1.8.10", "typings": "^0.7.12" } diff --git a/demo-shell-ng2/tests-runner.html b/demo-shell-ng2/tests-runner.html deleted file mode 100644 index e9a550572c..0000000000 --- a/demo-shell-ng2/tests-runner.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Alfresco Angular 2 Unit Tests - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/demo-shell-ng2/tsconfig.dev.json b/demo-shell-ng2/tsconfig.dev.json deleted file mode 100644 index 0cd78ac35d..0000000000 --- a/demo-shell-ng2/tsconfig.dev.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "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 a9ba2d14f1..0cd78ac35d 100644 --- a/demo-shell-ng2/tsconfig.json +++ b/demo-shell-ng2/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { "target": "es5", - "outDir": "dist/app", "module": "system", "moduleResolution": "node", "sourceMap": true, @@ -10,12 +9,8 @@ "removeComments": false, "noImplicitAny": false }, - "files": [ - "node_modules/angular2/typings/browser.d.ts", - "typings/browser/ambient/jasmine/index.d.ts", - "app/**/*.ts" - ], "exclude": [ + "dist", "node_modules", "typings/main", "typings/main.d.ts"