Skip to content

Commit 53837e8

Browse files
authored
Merge pull request #382 from cal-smith/master
chore: upgrade gulp
2 parents c8d4f38 + 005496e commit 53837e8

File tree

4 files changed

+697
-785
lines changed

4 files changed

+697
-785
lines changed

gulpfile.js

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ const sass = require("node-sass");
1111
const tap = require("gulp-tap");
1212
const path = require("path");
1313
const fs = require("fs");
14-
const es = require("event-stream");
15-
const runSequence = require("run-sequence");
1614

1715
//
1816
// Variables
@@ -51,55 +49,55 @@ const licenseTemplate = `/*!
5149
//
5250
// Build tasks
5351
// =================================
54-
gulp.task("build:angular", _ =>
52+
const buildAngular = () =>
5553
gulp.src(dirs.TS)
5654
.pipe(replaceTemplates())
57-
.pipe(gulp.dest(`${dirs.DIST}/src`))
58-
);
55+
.pipe(gulp.dest(`${dirs.DIST}/src`));
5956

60-
gulp.task("build:i18n", _ =>
57+
const buildI18n = () =>
6158
gulp.src(dirs.i18n)
62-
.pipe(gulp.dest(`${dirs.DIST}/i18n`))
63-
);
64-
65-
gulp.task("build:license", _ =>
66-
es.merge(
67-
gulp.src("LICENSE.md")
68-
.pipe(gulp.dest(dirs.DIST)),
69-
gulp.src([
70-
`${dirs.DIST}/**/*.scss`,
71-
`${dirs.DIST}/**/*.css`,
72-
`${dirs.DIST}/**/*.ts`,
73-
`${dirs.DIST}/**/*.js`
74-
])
75-
.pipe(licenseHeaders())
76-
.pipe(gulp.dest(dirs.DIST))
77-
)
78-
);
79-
80-
gulp.task("build:package", _ =>
59+
.pipe(gulp.dest(`${dirs.DIST}/i18n`));
60+
61+
const moveLicense = () =>
62+
gulp.src("LICENSE.md")
63+
.pipe(gulp.dest(dirs.DIST));
64+
65+
const buildLicense = () =>
66+
gulp.src([
67+
`${dirs.DIST}/**/*.scss`,
68+
`${dirs.DIST}/**/*.css`,
69+
`${dirs.DIST}/**/*.ts`,
70+
`${dirs.DIST}/**/*.js`
71+
])
72+
.pipe(licenseHeaders())
73+
.pipe(gulp.dest(dirs.DIST));
74+
75+
const buildPackage = () =>
8176
gulp.src("package.json")
82-
.pipe(gulp.dest(dirs.DIST))
83-
);
77+
.pipe(gulp.dest(dirs.DIST));
8478

85-
gulp.task("build:readme", _ =>
79+
const buildReadme = () =>
8680
gulp.src("README.md")
87-
.pipe(gulp.dest(dirs.DIST))
88-
);
89-
90-
gulp.task("build:changelog", _ =>
91-
gulp.src("CHANGELOG.md")
92-
.pipe(gulp.dest(dirs.DIST))
93-
);
81+
.pipe(gulp.dest(dirs.DIST));
9482

9583
//
9684
// Running tasks
9785
// =================================
98-
gulp.task("build", () => runSequence("build:angular", "build:i18n"));
99-
100-
gulp.task("build:meta", _ =>
101-
runSequence("build:package", ["build:license", "build:readme", "build:changelog"])
102-
);
86+
const build = gulp.series(buildAngular, buildI18n);
87+
88+
const buildMeta = gulp.series(buildPackage, gulp.parallel(moveLicense, buildLicense, buildReadme));
89+
90+
module.exports = {
91+
build,
92+
buildAngular,
93+
buildI18n,
94+
buildLicense,
95+
buildPackage,
96+
buildReadme,
97+
moveLicense,
98+
buildMeta,
99+
default: build
100+
};
103101

104102
//
105103
// Functions

0 commit comments

Comments
 (0)