2018-06-18 01:24:03 +00:00
|
|
|
var map = require('map-stream');
|
|
|
|
var vfs = require('vinyl-fs');
|
|
|
|
|
|
|
|
vfs.src(['./dist/css/*.css'])
|
2018-06-18 01:31:46 +00:00
|
|
|
.pipe(map(function (file, cb) {
|
|
|
|
var content = file.contents;
|
|
|
|
content = content.toString('utf8');
|
2018-06-18 01:39:52 +00:00
|
|
|
content = content.replace('/banner.jpg', '../banner.jpg').replace(/\/font\//ig, '../font/')
|
2018-06-18 01:31:46 +00:00
|
|
|
file.contents = Buffer.from(content);
|
|
|
|
|
|
|
|
cb(null, file);
|
|
|
|
}))
|
|
|
|
.pipe(vfs.dest('./dist/css/'));
|
|
|
|
|
|
|
|
vfs.src(['./dist/js/*.js'])
|
|
|
|
.pipe(map(function (file, cb) {
|
|
|
|
var content = file.contents;
|
|
|
|
content = content.toString('utf8');
|
2018-06-18 01:39:52 +00:00
|
|
|
content = content.replace('/data.yaml', './data.yaml');
|
2018-06-18 01:31:46 +00:00
|
|
|
file.contents = Buffer.from(content);
|
|
|
|
|
|
|
|
cb(null, file);
|
|
|
|
}))
|
|
|
|
.pipe(vfs.dest('./dist/js/'));
|