-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
63 lines (51 loc) · 1.75 KB
/
gulpfile.js
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
var gulp = require('gulp'),
merge = require('merge-stream'),
concat = require('gulp-concat');
function moveAndRenameFile(origin, name, destination) {
return gulp.src(origin)
.pipe(concat(name))
.pipe(gulp.dest(destination));
}
function renderStatics() {
moveAndRenameFile(
"node_modules/chartist/LICENSE-MIT",
"LICENSE-CHARTIST",
"dist/licenses/"
);
moveAndRenameFile(
"node_modules/chartist-plugin-axistitle/LICENSE",
"LICENSE-CHARTIST-PLUGIN-AXISTITLE",
"dist/licenses/"
);
moveAndRenameFile(
"node_modules/chartist/dist/chartist.min.js.map",
"chartist.min.js.map",
"dist/static/js/"
);
moveAndRenameFile(
"node_modules/chartist-plugin-axistitle/dist/chartist-plugin-axistitle.min.js.map",
"chartist-plugin-axistitle.min.js.map",
"dist/static/js/"
);
var chartist = gulp.src([
"node_modules/chartist/dist/chartist.min.js",
"node_modules/chartist-plugin-axistitle/dist/chartist-plugin-axistitle.min.js"
]);
var chartistCSS = gulp.src([
"dist/assets/sass/chartistLicense.scss",
"node_modules/chartist/dist/scss/chartist.scss"
]);
var chartistCSSSettings = gulp.src([
"dist/assets/sass/chartistLicense.scss",
"node_modules/chartist/dist/scss/settings/_chartist-settings.scss"
]);
chartistCSS.pipe(concat("chartist.scss"))
.pipe(gulp.dest("dist/assets/sass"));
chartistCSSSettings.pipe(concat("_chartist-settings.scss"))
.pipe(gulp.dest("dist/assets/sass/settings/"));
return chartist.pipe(concat("chartist.min.js"))
.pipe(gulp.dest("dist/static/js/"));
}
gulp.task('make', function () {
return renderStatics();
})