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

Commit

Permalink
feat(build): add support for generating examples static site
Browse files Browse the repository at this point in the history
 - for uploading to places.  you know...
  • Loading branch information
justindujardin committed Dec 13, 2015
1 parent d938833 commit a9db1d2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.idea
dist/
out/
site/

ng2-material/**/*.css
ng2-material/**/*.css.map
Expand Down
24 changes: 23 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ module.exports = function (grunt) {
pkg: grunt.file.readJSON('package.json'),
sourceRoot: 'ng2-material',
outPath: 'out',
sitePath: 'site',
clean: [
"dist/",
"<%- outPath %>/",
"<%- sitePath %>/",
"<%- sourceRoot %>/**/*.js",
"<%- sourceRoot %>/**/*.d.ts",
"<%- sourceRoot %>/**/*.js.map",
Expand All @@ -25,7 +27,6 @@ module.exports = function (grunt) {
{expand: true, cwd: 'ng2-material/', src: ['**/*.html'], dest: '<%- outPath %>/'},

// Source .ts/.scss files for people that prefer to build.
// TODO: this gets the .d.ts files as well. consider removing them.
{expand: true, cwd: 'ng2-material/', src: ['**/*.scss'], dest: '<%- outPath %>/source'},
{expand: true, cwd: 'ng2-material/', src: ['**/*.ts'], dest: '<%- outPath %>/source'},

Expand All @@ -37,6 +38,27 @@ module.exports = function (grunt) {
// Material Icons web font
{expand: true, cwd: 'public/', src: ['font/*.*'], dest: '<%- outPath %>/'}
]
},
// Examples site all nicely packaged up for uploading to an FTP.
site: {
files: [
{
expand: true,
src: [
'./node_modules/systemjs/dist/*.js',
'./node_modules/angular2/bundles/angular2.dev.js',
'./node_modules/angular2/typings/**/*'
],
dest: '<%- sitePath %>/<%- pkg.version %>/'
},

{expand: true, src: 'package.json', dest: '<%- sitePath %>/<%- pkg.version %>/'},
{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: 'public/**/*', dest: '<%- sitePath %>/<%- pkg.version %>/'},
{expand: true, src: 'examples/**/*', dest: '<%- sitePath %>/<%- pkg.version %>/'}
]
}
},
notify: {
Expand Down

0 comments on commit a9db1d2

Please sign in to comment.