Skip to content

timrwood/gulp-includer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-includer

NPM version Build Status Dependency Status

Concatenate JavaScript files with Includer as a gulp plugin.

Usage

First, install gulp-includer as a development dependency:

npm install --save-dev gulp-includer

Then, add it to your gulpfile.js:

var includer = require("gulp-includer");

gulp.src("./js/app.js", { read:false })
	.pipe(includer(options))
	.pipe(gulp.dest("./dist"));

API

includer(options)

These options are passed directly to Includer's options argument.

Type: String
Default: \n

The string to use to join files together.

Type: Function
Default: function (src) { return '(function(){' + src + '})()'; }

A function to optionally wrap each file in a closure.

Type: Boolean|Function
Default: false

Sometimes included globs have no matches. Includer will skip these globs silently.

If the debug option is true, a notification will be logged to the console when globs have no matches.

If the debug option is a function, it will be called with the debug message as the only parameter.

includer({
	debug : function (message) {
		logs.push(message);
	}
});

License

MIT License

About

Concatenate JavaScript files with Includer as a gulp plugin.

Resources

License

Stars

Watchers

Forks

Packages

No packages published