代码拉取完成,页面将自动刷新
同步操作将从 飞道工厂/daoke 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
const gulp = require('gulp');
const shell = require('gulp-shell');
gulp.task('compile-ts', shell.task('tsc -p ./tsconfig-desktop.json'));
gulp.task('watch-ts', shell.task('tsc -p ./tsconfig-desktop.json -w'));
gulp.task('clean', () => {
const del = require('del');
return del('./dist/');
});
// gulp.task('desktop', ['watch-tests-ts-umd', 'daoke:build-html', 'daoke:browser-sync']);
// gulp.task('desktop:watch-ts', shell.task('tsc -w'));
gulp.task('desktop:copy-files', () => {
return gulp.src('./src-desktop/pages/*.html').pipe(gulp.dest('./dist/pages'));
});
gulp.task('copy-config-files', () => {
return gulp.src(['./log4js.json', 'package.json']).pipe(gulp.dest('./dist'));
});
gulp.task('modify-config-files', async () => {
const fs = require('fs');
const file_content = require('./dist/package.json');
file_content.main = './app/app.js';
delete file_content['dependencies']['@feidao/widgets'];
file_content['dependencies']['@feidao-factory/framework'] = 'latest';
file_content['dependencies']['log4js'] = 'latest';
return await fs.writeFileSync('./dist/package.json', JSON.stringify(file_content, null, '\t'));
});
gulp.task('copy-modify-config-file', gulp.series('copy-config-files', 'modify-config-files'));
gulp.task('desktop:watch-files', () => {
return gulp.watch('./pages/*.html', (file) => {
// file.type added renamed deleted changed
if (file.type !== 'deleted') {
gulp.src(file.path)
.pipe(gulp.dest('./dist/pages/'));
}
});
});
gulp.task('desktop', gulp.series('clean', 'desktop:copy-files', 'compile-ts', gulp.parallel('desktop:watch-files', 'watch-ts')));
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。