Updated stripbom.

pull/3113/head
Taloth Saldono 10 years ago
parent 32fc68b9df
commit 4e6466e10c

@ -5,14 +5,14 @@ var concat = require('gulp-concat');
var wrap = require("gulp-wrap");
var path = require('path');
var streamqueue = require('streamqueue');
var stripbom = require('gulp-stripbom');
var paths = require('./paths.js');
var bom = require('./pipelines/gulp-bom.js');
gulp.task('handlebars', function () {
var coreStream = gulp.src([paths.src.templates, '!*/**/*Partial.*'])
.pipe(bom())
.pipe(stripbom({ showLog: false }))
.pipe(handlebars())
.pipe(declare({
namespace: 'T',
@ -29,7 +29,7 @@ gulp.task('handlebars', function () {
}));
var partialStream = gulp.src([paths.src.partials])
.pipe(bom())
.pipe(stripbom({ showLog: false }))
.pipe(handlebars())
.pipe(wrap('Handlebars.template(<%= contents %>)'))
.pipe(wrap('Handlebars.registerPartial(<%= processPartialName(file.relative) %>, <%= contents %>)', {}, {

@ -1,4 +0,0 @@
var replace = require('gulp-replace');
module.exports = function() {
return replace(/^\uFEFF/, '');
};

@ -1,22 +1,14 @@
var gulp = require('gulp');
var paths = require('./paths.js');
var bom = require('./pipelines/gulp-bom.js');
var gulpPrint = require('gulp-print');
var stripbom = require('gulp-stripbom');
var stripBom = function (dest) {
gulp.src([paths.src.scripts, paths.src.exclude.libs])
.pipe(bom())
.pipe(gulpPrint(function (filepath) {
return "booming: " + filepath;
}))
.pipe(stripbom({ showLog: false }))
.pipe(gulp.dest(dest));
gulp.src(paths.src.templates)
.pipe(bom())
.pipe(gulpPrint(function (filepath) {
return "booming: " + filepath;
}))
.pipe(stripbom({ showLog: false }))
.pipe(gulp.dest(dest));
};

@ -25,6 +25,7 @@
"gulp-less": "2.0.1",
"gulp-print": "1.1.0",
"gulp-replace": "0.5.2",
"gulp-stripbom": "1.0.4",
"gulp-run": "1.6.6",
"gulp-webpack": "1.2.0",
"gulp-wrap": "0.10.1",

Loading…
Cancel
Save