mirror of
https://github.com/caojiezi2003/clock-shop.git
synced 2024-11-12 23:09:45 +00:00
15 lines
424 B
JavaScript
15 lines
424 B
JavaScript
|
var map = require('map-stream');
|
||
|
var vfs = require('vinyl-fs');
|
||
|
|
||
|
var replace = function (file, cb) {
|
||
|
var content = file.contents;
|
||
|
content = content.toString('utf8');
|
||
|
content = content.replace('/banner.jpg','../banner.jpg').replace('/font/','../font/')
|
||
|
file.contents = Buffer.from(content);
|
||
|
|
||
|
cb(null, file);
|
||
|
};
|
||
|
|
||
|
vfs.src(['./dist/css/*.css'])
|
||
|
.pipe(map(replace))
|
||
|
.pipe(vfs.dest('./dist/css/'));
|