From 59e84dd8ef3385efe8da4492d6b5c5c7bff7ef92 Mon Sep 17 00:00:00 2001 From: Justin DuJardin Date: Sat, 19 Dec 2015 14:38:14 -0800 Subject: [PATCH] chore(build): add dist folder to gh-pages --- Gruntfile.js | 16 ++++++++++++++++ config.js | 3 --- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 764c3e04..f2126c0c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -71,6 +71,7 @@ module.exports = function (grunt) { {expand: true, src: 'index.html', dest: '<%- sitePath %>/<%- pkg.version %>/'}, {expand: true, src: 'config.js', dest: '<%- sitePath %>/<%- pkg.version %>/'}, {expand: true, src: 'ng2-material/**/*', dest: '<%- sitePath %>/<%- pkg.version %>/'}, + {expand: true, src: 'dist/*.*', dest: '<%- sitePath %>/<%- pkg.version %>/'}, {expand: true, src: 'public/**/*', dest: '<%- sitePath %>/<%- pkg.version %>/'}, {expand: true, src: 'examples/**/*', dest: '<%- sitePath %>/<%- pkg.version %>/'} ] @@ -214,18 +215,33 @@ module.exports = function (grunt) { var done = this.async(); var Builder = require('systemjs-builder'); var builder = new Builder('./', './config.bundle.js'); + + // Strip the extension off of the output System js import names. + + //var fs = require('fs'); + // + //function fixPaths(file) { + // var contents = fs.readFileSync(file).toString(); + // contents = contents.replace(/("ng2-material\/.*?\.ts")/g, function (match) { + // return match.replace('.ts', ''); + // }); + // fs.writeFileSync(file, contents, 'utf-8'); + //} + builder .bundle('ng2-material', 'dist/ng2-material.js', { minify: false, sourceMaps: true }) .then(function () { + //fixPaths('dist/ng2-material.js'); return builder.bundle('ng2-material', 'dist/ng2-material.min.js', { minify: true, sourceMaps: true }); }) .then(function () { + //fixPaths('dist/ng2-material.min.js'); done(); }); }); diff --git a/config.js b/config.js index 1041a585..139f6bff 100644 --- a/config.js +++ b/config.js @@ -7,8 +7,5 @@ System.config({ defaultExtension: 'js' } }, - map: { - "angular2/*" : "node_modules/angular2/*" - }, baseURL: './' });