-
Notifications
You must be signed in to change notification settings - Fork 4
/
GulpFile.js
60 lines (51 loc) · 1.7 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
51
52
53
54
55
56
57
58
59
60
var gulp = require('gulp'),
rename = require('gulp-rename'),
minifycss = require('gulp-minify-css'),
header = require('gulp-header');
var less = require('gulp-less'),
sass = require('gulp-sass');
var pkg = require('./package.json');
var banner = ['/**',
' * <%= pkg.name %> - <%= pkg.description %>',
' * @version v<%= pkg.version %>',
' * @link <%= pkg.homepage %>',
' * @license ' + pkg.license + ' : https://github.com/nico3333fr/ROCSSTI/blob/master/LICENSE',
' */',
''].join('\n');
gulp.task('css', function () {
return gulp.src('./src/css/*.css')
.pipe(gulp.dest('./dist/css/'))
.pipe(minifycss())
.pipe(rename(function (path) {
path.basename += '.min';
}))
.pipe(header(banner, { pkg : pkg } ))
.pipe(gulp.dest('./dist/css/'));
});
gulp.task('less', function () {
return gulp.src(['./src/less/rocssti-fr/rocssti-fr.less','./src/less/rocssti-en/rocssti-en.less'])
.pipe(less())
.pipe(gulp.dest('./dist/less/'))
.pipe(minifycss())
.pipe(rename(function (path) {
path.basename += '.min';
}))
.pipe(header(banner, { pkg : pkg } ))
.pipe(gulp.dest('./dist/less/'));
});
gulp.task('sass', function () {
return gulp.src(
['./src/sass/rocssti-fr/rocssti-fr.scss',
'./src/sass/rocssti-en/rocssti-en.scss',
'./src/sass/rocssti-mobile-first-fr/rocssti-mobile-first-fr.scss',
'./src/sass/rocssti-mobile-first-en/rocssti-mobile-first-en.scss'])
.pipe(sass())
.pipe(gulp.dest('./dist/sass/'))
.pipe(minifycss())
.pipe(rename(function (path) {
path.basename += '.min';
}))
.pipe(header(banner, { pkg : pkg } ))
.pipe(gulp.dest('./dist/sass/'));
});
gulp.task('default', ['css']);