PluginProbe
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts / 2.3.1
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts v2.3.1
2.7.7 2.7.6 2.7.5 2.7.4 trunk 1.3 2.0.4 2.0.6 2.1.91 2.2.4 2.2.7 2.2.9 2.3.1 2.3.10 2.4.10 2.4.2 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.6.0 2.6.1 2.7.0 All 28 releases
insert-php / admin / assets / gulpfile.js

gulpfile.js in Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts 2.3.1, at admin/assets/gulpfile.js

51 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 let gulp = require('gulp'),
2 less = require('gulp-less'),
3 concat = require('gulp-concat'),
4 minify = require('gulp-minify-css'),
5 merge = require('merge-stream'),
6 uglify = require('gulp-uglify');
7
8 // Less files to be concat and minified together
9 let LESS_PATHS = ['css/general.less', 'css/sync.less'];
10
11 // Css files to be concat and minified together with Less (paths above)
12 let CSS_PATHS = ['css/code-editor.min.css'];
13
14 // JS files to be concat and minified together
15 let JS_PATHS = ['js/code-editor.min.js', 'js/sync.js'];
16
17 /**
18 * Prepares minification of specified Less and CSS files for CodeMirror specifically.
19 *
20 * Execution: gulp cm-build-css
21 */
22 gulp.task('cm-build-css', function () {
23
24 // Less
25 let lessStream = gulp.src(LESS_PATHS)
26 .pipe(less())
27 .pipe(concat('less-files.less'));
28
29 // CSS
30 let cssStream = gulp.src(CSS_PATHS)
31 .pipe(concat('css/code-editor.min.css'));
32
33 return merge(lessStream, cssStream)
34 // c - custom, c - code, m - mirror
35 .pipe(concat('ccm.min.css'))
36 .pipe(minify())
37 .pipe(gulp.dest('dist/css'));
38 });
39
40 /**
41 * Prepares minification of specified JS files for CodeMirror specifically.
42 *
43 * Execution: gulp cm-build-js
44 */
45 gulp.task('cm-build-js', function () {
46 // Js
47 return gulp.src(JS_PATHS)
48 .pipe(uglify())
49 .pipe(concat('ccm.min.js'))
50 .pipe(gulp.dest('dist/js'));
51 });