diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..7bf6eb18f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +bower_components +node_modules diff --git a/build.bat b/build.bat deleted file mode 100644 index 12479f7da9..0000000000 --- a/build.bat +++ /dev/null @@ -1,2 +0,0 @@ -START /B vulcanize polymer-simplex.html --inline --strip -output dist/polymer-simplex.html -START /B vulcanize polymer.html --inline --strip -output dist/polymer.html diff --git a/dist/polymer-micro.html b/dist/polymer-micro.html new file mode 100644 index 0000000000..1821643d68 --- /dev/null +++ b/dist/polymer-micro.html @@ -0,0 +1,427 @@ +
+ + \ No newline at end of file diff --git a/dist/polymer-mini.html b/dist/polymer-mini.html new file mode 100644 index 0000000000..3c6dbf9316 --- /dev/null +++ b/dist/polymer-mini.html @@ -0,0 +1,957 @@ + + + + \ No newline at end of file diff --git a/dist/polymer.html b/dist/polymer.html new file mode 100644 index 0000000000..f49a364f2f --- /dev/null +++ b/dist/polymer.html @@ -0,0 +1,2951 @@ + + + + \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000000..cf88ba6bd4 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,45 @@ +var gulp = require('gulp'); +var replace = require('gulp-replace'); +var shell = require('gulp-shell'); +var sequence = require('gulp-sequence'); + +var polyclean = require('polyclean'); + +function vulcanize(filename, dstdir, excludes) { + var cmd = 'node_modules/vulcanize/bin/vulcanize'; + if (excludes && excludes.length > 0) { + excludes.forEach(function(exclude) { + cmd = cmd + ' --exclude ' + exclude; + }); + cmd = cmd + ' --implicit-strip'; + } + cmd = cmd + ' ' + filename + ' > ' + dstdir + '/' + filename; + return cmd +} + +var micro = "polymer-micro.html"; +var mini = "polymer-mini.html"; +var max = "polymer.html"; + +gulp.task('micro', shell.task(vulcanize(micro, 'dist'))); +gulp.task('mini', shell.task(vulcanize(mini, 'dist', [micro]))); +gulp.task('max', shell.task(vulcanize(max, 'dist', [mini, micro]))); + +gulp.task('strip', function() { + return gulp.src('dist/*.html') + .pipe(polyclean.cleanJsComments()) + // Get rid of erroneous html comments + .pipe(replace(//g, '')) + // Reduce script tags + .pipe(replace(/<\/script>\s*