Skip to content

Commit

Permalink
Added Gulp tasks to copy the Angular 2 dependencies to the wwwroot fo…
Browse files Browse the repository at this point in the history
…lder
  • Loading branch information
nbellocam committed Mar 14, 2016
1 parent 452a86e commit 1d2a6f1
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion src/MyAngular2BaseApp/gulpfile.js
@@ -1,4 +1,4 @@
/// <binding Clean='clean' />
/// <binding Clean='clean' ProjectOpened='copy-deps' />
"use strict";

var gulp = require("gulp"),
Expand All @@ -17,6 +17,8 @@ paths.css = paths.webroot + "css/**/*.css";
paths.minCss = paths.webroot + "css/**/*.min.css";
paths.concatJsDest = paths.webroot + "js/site.min.js";
paths.concatCssDest = paths.webroot + "css/site.min.css";
paths.npmSrc = "./node_modules/";
paths.npmLibs = paths.webroot + "lib/npmlibs/";

gulp.task("clean:js", function (cb) {
rimraf(paths.concatJsDest, cb);
Expand All @@ -43,3 +45,25 @@ gulp.task("min:css", function () {
});

gulp.task("min", ["min:js", "min:css"]);

gulp.task("copy-deps:systemjs", function () {
return gulp.src(paths.npmSrc + '/systemjs/dist/**/*.*', { base: paths.npmSrc + '/systemjs/dist/' })
.pipe(gulp.dest(paths.npmLibs + '/systemjs/'));
});

gulp.task("copy-deps:angular2", function () {
return gulp.src(paths.npmSrc + '/angular2/bundles/**/*.js', { base: paths.npmSrc + '/angular2/bundles/' })
.pipe(gulp.dest(paths.npmLibs + '/angular2/'));
});

gulp.task("copy-deps:es6-shim", function () {
return gulp.src(paths.npmSrc + '/es6-shim/es6-sh*', { base: paths.npmSrc + '/es6-shim/' })
.pipe(gulp.dest(paths.npmLibs + '/es6-shim/'));
});

gulp.task("copy-deps:rxjs", function () {
return gulp.src(paths.npmSrc + '/rxjs/bundles/*.*', { base: paths.npmSrc + '/rxjs/bundles/' })
.pipe(gulp.dest(paths.npmLibs + '/rxjs/'));
});

gulp.task("copy-deps", ["copy-deps:rxjs", 'copy-deps:angular2', 'copy-deps:systemjs', 'copy-deps:es6-shim']);

0 comments on commit 1d2a6f1

Please sign in to comment.