How to use the replaceExtension function from gulp-util
Find comprehensive JavaScript gulp-util.replaceExtension code examples handpicked from public code repositorys.
47 48 49 50 51 52 53 54 55 56
}, }, function (err, result) { if (err) console.log('Error parsing SCSS', err); file.contents = result.css; file.path = gutil.replaceExtension(file.path, '.css'); debug('Finished'); cb(err, file);
62
943
35
+ 3 other calls in file
GitHub: jkoudys/janeswalk-web
151 152 153 154 155 156 157 158 159 160
} } } file.contents = new Buffer(JSON.stringify(trans)); file.path = gutil.replaceExtension(file.path, '.json'); cb(null, file); }); return stream; })())
5
7
7
63 64 65 66 67 68 69 70 71 72
function (output) { process.chdir(cwd); stream.push(new gutil.File({ base: file.base, cwd: file.cwd, path: gutil.replaceExtension(file.path, options.extension), contents: new Buffer(output) })); done(); },
4
5
9
8 9 10 11 12 13 14 15 16 17
module.exports = function (opt) { function replaceExtension(path) { path = path.replace(/\.coffee\.md$/, '.litcoffee'); path = path.replace(/\.iced\.md$/, '.liticed'); return gutil.replaceExtension(path, '.js'); } function transform(file, enc, cb) { if (file.isNull()) return cb(null, file);
74
0
2
50 51 52 53 54 55 56 57 58 59
var filePath = file.path; try { file.contents = new Buffer("module.exports=" + pegjs.buildParser(file.contents.toString(), options)); file.path = gutil.replaceExtension(file.path, '.js'); this.push(file); } catch (err) { this.emit('error', new gutil.PluginError('gulp-pegjs', err, {fileName: filePath})); }
36
0
1
3 4 5 6 7 8 9 10 11
function replaceExtension(path) { path = path.replace(/\.clj\.clj\.cljs$/) return gutil.replaceExtension(path, '.js') } module.exports = replaceExtension
2
2
3
gulp-util.log is the most popular function in gulp-util (1090 examples)