0.0.7 • Published 7 years ago
gulp-inline-txt v0.0.7
gulp-inline-txt
A gulp plugin to Inline any text files.
Install
$ npm i gulp-inline-txt -D
basic usage:
in your gulpfiles
var inline = require('gulp-inline-txt');
gulp.task('inline', function() {
return gulp.src('src/js/a.js')
.pipe(inline())
.pipe(gulp.dest('build/js'));
});
In your file, such as a js file:
a.js
console.log(1);
__inline('./b.js');
b.js (which is to be inlined)
console.log(2);
and the result, a.js will be:
console.log(1);
console.log(2);
Also you can cancel the inline temporarily.
//__inline('path/to/file')