-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgulpfile.js
42 lines (35 loc) · 1.11 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
/**
* gulpfile.js for windowbuilder.js
*
* © Evgeniy Malyarov http://www.oknosoft.ru 2014-2016
*/
const gulp = require('gulp'),
concat = require('gulp-concat'),
umd = require('gulp-umd'),
decomment = require('./scripts/decoment');
module.exports = gulp;
// Сборка библиотеки для использования снаружи
gulp.task('build-drawer', function () {
return gulp.src([
'./src/editor/*.js',
'./src/geometry/**/*.js',
'./src/modifiers/common/*.js',
'./src/modifiers/enums/*.js',
'./src/modifiers/catalogs/*.js',
'./src/modifiers/chartscharacteristics/*.js',
'./src/modifiers/documents/*.js',
])
.pipe(concat('drawer.js'))
.pipe(decomment({safe: true, trim: true}))
.pipe(umd({
// exports: function (file) {
// return 'EditorInvisible';
// },
templateSource: `/*!
* Движок графического построителя
* © Evgeniy Malyarov https://oknosoft.ru 2014-2023
*/
module.exports = function({$p, paper}) {<%= contents %> \nreturn EditorInvisible;\n}`,
}))
.pipe(gulp.dest('./dist'));
});