forked from contributte/componette-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulp.admin.js
56 lines (52 loc) · 1.75 KB
/
gulp.admin.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
var gulp = require('gulp');
var less = require('gulp-less');
var minifyCss = require('gulp-minify-css');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var order = require('gulp-order');
var remoteSrc = require('gulp-remote-src');
module.exports = function () {
gulp.task('admin-css', function () {
gulp.src('www/assets/admin/css/theme.less')
.pipe(less())
.pipe(minifyCss({compatibility: 'ie8'}))
.pipe(concat('admin.bundle.css'))
.pipe(gulp.dest('www/dist'));
});
gulp.task('admin-css-remote', function () {
remoteSrc([
'twitter-bootstrap/3.3.6/css/bootstrap.min.css'
], {
base: 'https://cdnjs.cloudflare.com/ajax/libs/'
})
.pipe(minifyCss({compatibility: 'ie8'}))
.pipe(concat('admin.external.css'))
.pipe(gulp.dest('www/dist/'));
});
gulp.task('admin-js', function () {
gulp.src([
'www/assets/admin/js/**/*.js',
'www/assets/vendor/**/*.js'
])
.pipe(order([
'nette/nette.forms.js',
'nette/nette.ajax.js',
'main.js'
]))
.pipe(uglify())
.pipe(concat('admin.bundle.js'))
.pipe(gulp.dest('www/dist'));
});
gulp.task('admin-js-remote', function () {
remoteSrc([
'jquery/2.2.4/jquery.min.js',
'twitter-bootstrap/3.3.6/js/bootstrap.min.js',
'chosen/1.4.2/chosen.jquery.min.js'
], {
base: 'https://cdnjs.cloudflare.com/ajax/libs/'
})
.pipe(uglify())
.pipe(concat('admin.external.js'))
.pipe(gulp.dest('www/dist/'));
});
};