2019-06-29 22:16:09 +08:00
|
|
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL 3 */
|
|
|
|
const gulp = require('gulp');
|
|
|
|
const rimraf = require('gulp-rimraf');
|
|
|
|
const fs = require('node-fs');
|
|
|
|
|
2019-07-05 03:09:27 +08:00
|
|
|
const { config } = require('./config');
|
2019-06-29 22:16:09 +08:00
|
|
|
|
2019-07-05 03:09:27 +08:00
|
|
|
exports.del = (dir) => gulp.src(dir, { read: false, allowEmpty: true }).pipe(rimraf());
|
2019-06-29 22:16:09 +08:00
|
|
|
|
|
|
|
exports.copy = (sFile, sNewFile, done) => {
|
|
|
|
fs.writeFileSync(sNewFile, fs.readFileSync(sFile));
|
|
|
|
done();
|
|
|
|
};
|
|
|
|
|
2020-10-17 20:08:27 +08:00
|
|
|
exports.getHead = () => config.head.agpl;
|
2019-06-29 22:16:09 +08:00
|
|
|
|
|
|
|
exports.cleanStatic = () => exports.del(config.paths.static);
|