Last active
October 17, 2016 09:37
-
-
Save samthor/3337ed284c1cbb8c7348d3b9e9527612 to your computer and use it in GitHub Desktop.
Polymer/Closure: Step #1, Merge and split
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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