代码拉取完成,页面将自动刷新
import chug from 'gulp-chug';
import gulp from 'gulp';
import yargs from 'yargs';
const { argv } = yargs
.options({
rootPath: {
description: '<path> path to public assets directory',
type: 'string',
requiresArg: true,
required: false,
},
nodeModulesPath: {
description: '<path> path to node_modules directory',
type: 'string',
requiresArg: true,
required: false,
},
});
const config = [
'--rootPath',
argv.rootPath || '../../../../public/assets',
'--nodeModulesPath',
argv.nodeModulesPath || '../../../../node_modules',
];
export const buildAdmin = function buildAdmin() {
return gulp.src('src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
.pipe(chug({ args: config, tasks: 'build' }));
};
buildAdmin.description = 'Build admin assets.';
export const watchAdmin = function watchAdmin() {
return gulp.src('src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
.pipe(chug({ args: config, tasks: 'watch' }));
};
watchAdmin.description = 'Watch admin asset sources and rebuild on changes.';
export const buildShop = function buildShop() {
return gulp.src('src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
.pipe(chug({ args: config, tasks: 'build' }));
};
buildShop.description = 'Build shop assets.';
export const watchShop = function watchShop() {
return gulp.src('src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
.pipe(chug({ args: config, tasks: 'watch' }));
};
watchShop.description = 'Watch shop asset sources and rebuild on changes.';
export const build = gulp.parallel(buildAdmin, buildShop);
build.description = 'Build assets.';
export const watch = gulp.parallel(watchAdmin, watchShop);
watch.description = 'Watch asset sources and rebuild on changes.';
gulp.task('admin', buildAdmin);
gulp.task('admin-watch', watchAdmin);
gulp.task('shop', buildShop);
gulp.task('shop-watch', watchShop);
export default build;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。