gulpfile.js
changeset 0 f05d7aea098a
child 11 b6023e43122d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gulpfile.js	Fri Jul 10 16:59:11 2020 +0200
@@ -0,0 +1,35 @@
+
+const { src, dest, task, watch, parallel } = require('gulp');
+const concat = require('gulp-concat');
+const less = require('gulp-less');
+
+const
+	package = require('./package.json'),
+	paths = package.paths;
+
+
+task('css', function() {
+	return src(paths.less_main, { cwd: paths.less_base })
+		.pipe(less())
+		.pipe(dest(paths.less_target));
+});
+
+
+task('scripts', function() {
+	return src(paths.sources, { cwd: paths.base })
+		.pipe(concat(paths.target.replace(/{version}/, package.version)))
+		.pipe(dest(paths.base));
+});
+
+
+task('scripts_core', function() {
+	return src(paths.core_sources, { cwd: paths.base })
+		.pipe(concat(paths.core_target.replace(/{version}/, package.version)))
+		.pipe(dest(paths.base));
+});
+
+
+exports.default = function() {
+	watch(paths.sources, { cwd: paths.base }, parallel('scripts', 'scripts_core'));
+	watch(paths.less_sources, { cwd: paths.less_base}, parallel('css'));
+};