Skip to content

Instantly share code, notes, and snippets.

@samthor
Last active October 17, 2016 09:37
Polymer/Closure: Step #1, Merge and split
const gulp = require('gulp');
const vulcanize = require('gulp-vulcanize');
const crisper = require('gulp-crisper');
gulp.task('merge', function() {
return gulp.src('src/elements.html')
.pipe(vulcanize({
excludes: ['bower_components/polymer/polymer.html'], // polymer doesn't compile properly
}))
.pipe(crisper({onlySplit: true})) // don't inline script, since we compile it again
.pipe(gulp.dest('dest'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment