-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
49 lines (43 loc) · 1.28 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
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var less = require('gulp-less');
var path = require('path');
var minifyCSS = require('gulp-minify-css');
var inject = require('gulp-inject');
// watch files for changes and reload
gulp.task('serve', function() {
browserSync({
server: {
baseDir: 'files'
}
});
gulp.watch(['*.html', 'css/**/*.css', 'js/**/*.js'], {cwd: 'files'}, reload);
});
gulp.task('less', function () {
return gulp.src('./less/hdc/*.less')
.pipe(less({
paths: [ path.join(__dirname, 'less') ]
}))
.pipe(minifyCSS())
.pipe(gulp.dest('./files/css'));
});
gulp.task('all', function () {
return gulp.src('./files/*.html')
.pipe(inject (gulp.src([
'./files/css/bootstrap.min.css',
'./files/css/estilo.css',
'./files/css/material-fullpalette.min.css',
'./files/css/material.min.css',
'./files/css/ripples.min.css',
'./files/css/roboto.min.css',
'./files/js/jquery.min.js',
'./files/js/npm.js',
'./files/js/bootstrap.js',
'./files/js/bootstrap.min.js',
'./files/js/material.js',
'./files/js/material.min.js',
'./files/js/ripples.js',
'./files/js/ripples.min.js'], {read: false}), {relative: true}))
.pipe(gulp.dest('./files'));
});