-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
42 lines (37 loc) · 1.17 KB
/
gulpfile.js
File metadata and controls
42 lines (37 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const Path = require('path');
const { src, dest, parallel, series } = require('gulp');
// const rename = require('gulp-rename');
// const gulpif = require('gulp-if');
// const del = require('del');
function createPluginTask(pluginName) {
return parallel(
() => {
return src(Path.join('src', 'plugins', pluginName, 'templates', '**', '*'))
.pipe(dest(Path.join('build','plugins', pluginName, 'templates')));
},
() => {
return src(Path.join('src', 'plugins', pluginName, 'partials', '**', '*'))
.pipe(dest(Path.join('build','plugins', pluginName, 'partials')));
}
);
}
// function clean() {
// return del('build');
// }
function corePlugin() {
return src([
'src/plugins/core/templates/**/*',
'src/plugins/core/partials/**/*'
]).pipe(dest('build/plugins/core'));
}
function dashboardPlugin() {
return src([
'src/plugins/dashboard/templates/**/*',
'src/plugins/dashboard/partials/**/*'
]).pipe(dest('build/plugins/dashboard'));
}
// exports.clean = clean;
exports.corePlugin = createPluginTask('core');
exports.dashboardPlugin = createPluginTask('dashboard');
exports.default = parallel(corePlugin, dashboardPlugin);
// exports.default = series(clean, corePlugin);