This repository has been archived by the owner on Jun 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
41 lines (30 loc) · 1.51 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
const gulp = require('gulp');
const tripleGulp = require('meister-js-dev').gulp;
const webpackTask = require('meister-gulp-webpack-tasks');
// Building tasks.
const MODULE_NAME = 'Html5player';
// building tasks
gulp.task('build', (done) => {
const bundleConfig = webpackTask.createConfig('./index.js', `build/${MODULE_NAME}.js`, false);
const bundleCompiler = webpackTask.createCompiler(bundleConfig);
webpackTask.createBuildTask(bundleCompiler)(done);
});
gulp.task('build:dist', (done) => {
const bundleConfigDist = webpackTask.createConfig('./index.js', `dist/${MODULE_NAME}.js`, false);
const bundleCompilerDist = webpackTask.createCompiler(bundleConfigDist);
webpackTask.createBuildTask(bundleCompilerDist)(done);
});
gulp.task('build:min', (done) => {
const bundleConfigMin = webpackTask.createConfig('./index.js', `dist/${MODULE_NAME}.min.js`, true);
const bundleCompilerMin = webpackTask.createCompiler(bundleConfigMin);
webpackTask.createBuildTask(bundleCompilerMin)(done);
});
// Documentation tasks.
gulp.task('js-docs', tripleGulp.jsdocModule.createGenerateDocs(['./src/**/*.js'], './docs/js-docs'));
// Versioning tasks.
gulp.task('bump-version', tripleGulp.versioningModule.createBumpVersion('./package.json'));
// Changelog tasks.
gulp.task('changelog', tripleGulp.changelogModule.createGenerateLog('./CHANGELOG.md'));
// Cleaning tasks
gulp.task('clean:build', tripleGulp.cleanModule.createClean('./build/*'));
gulp.task('clean:dist', tripleGulp.cleanModule.createClean('./dist/*'));