Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Commit

Permalink
chore(build): add dist folder to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
justindujardin committed Dec 19, 2015
1 parent 0b5cc5b commit 59e84dd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
16 changes: 16 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>/'}
]
Expand Down Expand Up @@ -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();
});
});
Expand Down
3 changes: 0 additions & 3 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@ System.config({
defaultExtension: 'js'
}
},
map: {
"angular2/*" : "node_modules/angular2/*"
},
baseURL: './'
});

0 comments on commit 59e84dd

Please sign in to comment.