gulp-concat-script
1.0.3 • Public • Published gulp-concat-script
Parses js files, finds document.write('<script src="*.js"></script>')
directive and includes these files.
Installation
Install package with NPM and add it to your development dependencies:
npm install --save-dev gulp-concat-script
Usage
var gulp = require('gulp'),
concatScript = require('gulp-concat-script');
gulp.task("scripts", function() {
gulp.src("js/config.js")
.pipe(concatScript())
.pipe(gulp.dest("dist/js/"));
});
config.js:
document.write('<script src="libs/jquery.js"></script>');
document.write('<script src="libs/bootstrap.js"></script>');
document.write('<script src="js/app.js"></script>');
Know issues
- Cannot process minified files
- Cannot process urls
License
The MIT Lincense
Package Sidebar
Install
Weekly Downloads