Skip to content

Instantly share code, notes, and snippets.

@sorvell
Created May 20, 2015 20:08
Show Gist options
  • Save sorvell/a8bbcdad2a99c15ff78c to your computer and use it in GitHub Desktop.
Save sorvell/a8bbcdad2a99c15ff78c to your computer and use it in GitHub Desktop.
Polybuild
// Given this file tree
/utils/polybuild
/projects/my-app/
components/
polymer
iron-icon
elements.html
index.html
// Build use cases:
>utils/polybuild/bin/polybuild projects/my-app/index.html
// output:
index.build.html
index.build.js
>utils/polybuild/bin/polybuild projects/my-app/elements.html
// output:
elements.build.html
elements.build.js
// manual fixup of index.html required
// Build index.html with gulp:
(e.g.) gulpconfig.js:
polybuild = require('polybuild');
gulp = require('gulp');
gulp.task('build', function() {
return gulp.src('index.html').pipe(polybuild()).pipe(gulp.dst('.'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment