This repository was archived by the owner on Jun 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
30 lines (23 loc) · 1.38 KB
/
gulpfile.js
File metadata and controls
30 lines (23 loc) · 1.38 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
const gulp = require('gulp');
const tripleGulp = require('meister-js-dev').gulp;
const webpackTask = require('meister-gulp-webpack-tasks');
// Building tasks.
const MODULE_NAME = 'Message';
const bundleConfig = webpackTask.createConfig('./index.js', `build/${MODULE_NAME}.js`);
const bundleCompiler = webpackTask.createCompiler(bundleConfig);
gulp.task('build', webpackTask.createBuildTask(bundleCompiler));
const bundleConfigDist = webpackTask.createConfig('./index.js', `dist/${MODULE_NAME}.js`);
const bundleCompilerDist = webpackTask.createCompiler(bundleConfigDist);
gulp.task('build:dist', webpackTask.createBuildTask(bundleCompilerDist));
const bundleConfigMin = webpackTask.createConfig('./index.js', `dist/${MODULE_NAME}.min.js`, true);
const bundleCompilerMin = webpackTask.createCompiler(bundleConfigMin);
gulp.task('build:min', webpackTask.createBuildTask(bundleCompilerMin));
// 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/*'));