tools: gulp-vulcanize doesnt seem to make use of abspath option
gulp-vulcanize does not seem to pick up the abspath option. It works fine when using vulcanize directly on command line.
gulp.task('vulcanize', ['html:elements'], function (done) {
/**
* gulp-vulcanize does not work as expected!
*/
// return gulp.src('./dist/assets/elements/x-app/all-imports.html')
// .pipe(plug.vulcanize({
// abspath: __dirname
// }))
// .pipe(plug.concat('x-app.vulcanized.html'))
// .pipe(gulp.dest('./dist/assets/bundle'));
/**
* same thing using command-line does work
*/
var output = [],
child = spawn(
'./node_modules/gulp-vulcanize/node_modules/.bin/vulcanize',
[ '--abspath', '.', 'dist/assets/elements/x-app/all-imports.html' ],
{ cwd: __dirname }
);
child.stdout.on('data', function (b) {
output.push(b);
});
child.on('close', function() {
var filename = __dirname + '/dist/assets/bundle/x-app.vulcanized.html';
mkdirp(path.dirname(filename), function() {
fs.writeFile(filename, Buffer.concat(output), done);
});
});
});
all-imports.html contains both relative and absolute imports. Eg:
<link rel="import" href="./x-app.html">
<link rel="import" href="/bower_components/paper-styles/paper-styles.html">
<link rel="import" href="../lorem-ipsum/lorem-ipsum.html">
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 22 (3 by maintainers)
I still cannot get this to work with gulp-vulcanize properly - polymer is included twice. Output during build:
And in browser when loading vulcanized elements:
If I try the
abspath&inputUrlconfig like:The vulcanize task doesn’t run, gulp just exits with no error.
Running
vulcanize -p dist /elements/elements.vulcanized.htmlcreates the correct content.