forked from taylormsj/acf-code_area-field
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
36 lines (32 loc) · 905 Bytes
/
gulpfile.js
File metadata and controls
36 lines (32 loc) · 905 Bytes
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
'use strict';
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
csso = require('gulp-csso'),
rename = require('gulp-rename'),
concat = require('gulp-concat');
gulp.task('css', function () {
return gulp.src('css/codemirror.css')
.pipe(csso())
.pipe(rename(function (path) {
path.basename += '.min';
}))
.pipe(gulp.dest('css'));
});
gulp.task('js', function () {
return gulp.src([
'js/codemirror.js',
'js/mode/javascript.js',
'js/mode/css.js',
'js/mode/htmlmixed.js',
'js/mode/xml.js',
'js/mode/php.js',
'js/mode/clike.js',
'js/addon/xml-fold.js',
'js/addon/matchtags.js',
'js/acf-code_area.js'
])
.pipe(uglify())
.pipe(concat('acf-code_area.min.js'))
.pipe(gulp.dest('js'));
});
gulp.task('default', ['css', 'js']);