-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
50 lines (44 loc) · 1.34 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
41
42
43
44
45
46
47
48
49
50
var gulp = require("gulp");
var uglify = require('gulp-uglify');
var uglifycss = require('gulp-uglifycss');
var rename = require('gulp-rename');
var sourcemaps = require('gulp-sourcemaps');
var debug = require('gulp-debug');
var concat = require('gulp-concat');
gulp.task('default', ['js', 'css', 'copy_js', 'copy_css']);
gulp.task('js', function () {
return gulp.src([
'scripts/slgSpinner.js',
'scripts/slgComponents.js',
'scripts/slgButtonSpinner.js',
'scripts/slgAutoComplete.js',
'scripts/slgPleaseWait.js',
'scripts/slgTabs.js'])
.pipe(concat('slgComponents.min.js'))
.pipe(sourcemaps.init())
//.pipe(uglify())
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('npm/dist/js'))
});
gulp.task('css', function () {
return gulp.src(['content/slgComponents.css',
'content/slgButtonSpinner.css',
'content/slgAutoComplete.css',
'content/slgPleaseWait.css',
'content/slgTabs.css'])
.pipe(concat('slgComponents.min.css'))
.pipe(uglifycss())
.pipe(gulp.dest('npm/dist/css'))
});
gulp.task('copy_js', function () {
return gulp.src(['scripts/**/*.js'])
.pipe(gulp.dest('npm/src/js'))
});
gulp.task('copy_css', function () {
return gulp.src(['content/**/*.css',
'!content/bootstrap.css',
'!content/bootstrap-theme.css',
'!content/bootstrap-overrides.css',
'!content/font-awesome.css'])
.pipe(gulp.dest('npm/src/css'))
});