snappymail/tasks/common.js

18 lines
429 B
JavaScript
Raw Normal View History

2022-09-01 02:15:45 +08:00
/* RainLoop Webmail (c) RainLoop Team | Licensed under MIT */
2019-06-29 22:16:09 +08:00
const gulp = require('gulp');
const del = require('del');
const fs = require('fs');
2019-06-29 22:16:09 +08:00
2019-07-05 03:09:27 +08:00
const { config } = require('./config');
2019-06-29 22:16:09 +08:00
exports.del = (dir) => del(dir);
2019-06-29 22:16:09 +08:00
exports.copy = (sFile, sNewFile, done) => {
fs.writeFileSync(sNewFile, fs.readFileSync(sFile));
done();
};
exports.getHead = () => config.head.agpl;
2019-06-29 22:16:09 +08:00
exports.cleanStatic = () => del(config.paths.static);