filso / gulp-linker Goto Github PK
View Code? Open in Web Editor NEWAutomatic linking of JavaScript scripts into HTML files for gulp
License: MIT License
Automatic linking of JavaScript scripts into HTML files for gulp
License: MIT License
When you feel it is useful, could you run npm publish
and get this package registered with npm? It looks like 0.1.4 was published a month ago so the package.json
file will need to get updated before you send up a version to npm's registry.
I have a javascript task that concats all my js files to one file, "app.dev". That task runs parallel to my html task. Sometimes I "bundle" them to that single file and sometimes I link to all the files. Just depends on what I need.
I was able to get it working by making javascript a dependency of my html task. It seems kind of weird to me though especially being that it runs the javascript task even if I just want to run my html task. Any idea how this could be made better?
gulp.task('html', ['javascript'], function() {
return gulp.src(buildConfig.dev.globs.html)
.pipe(linker({
scripts: ['build/app.js'],
startTag: '<!--SCRIPTS-->',
endTag: '<!--SCRIPTS END-->',
fileTmpl: '<script src="%s"></script>',
appRoot: 'build',
relative: true
}))
.pipe(gulp.dest(buildConfig.dev.buildDir));
});
If you, it will update your index automatically on every change,
so you won't have to run task ever again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.