Skip to content

Insert js, html etc using comment i.e /* inject my_module.js */

License

Notifications You must be signed in to change notification settings

jiren/gulp-injector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#gulp-injector

Inject files into code.

Made for gulp 3

Usage

First, install gulp-injector as a dev dependency: npm install --save-dev gulp-injector

Inject files by adding comments inject and filename. In following example it will include my_module.js.

function somethingNew(){

  /* inject my_module.js */

}

gulpfile.js:

var gulp    = require('gulp'),
    inject  = require('gulp-injector'),

gulp.task("scripts", function() {
	gulp.src('src/js/main.js')
		.pipe( inject() )
		.pipe( gulp.dest("dist/js") )
});

gulp.task("default", "scripts");

Licence

MIT License

About

Insert js, html etc using comment i.e /* inject my_module.js */

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published