-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
101 lines (75 loc) · 2.08 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
var gulp = require('gulp'),
sass = require('gulp-sass')
,
notify = require("gulp-notify")
,
bower = require('gulp-bower');
// source and distribution folder
var
source = 'src/',
dest = './';
// Bootstrap scss source
var bootstrapSass = {
in: './bower_components/bootstrap-sass/'
};
// fonts
var fonts = {
in: [source + 'fonts/*.*', bootstrapSass.in + 'assets/fonts/**/*'],
out: dest + 'fonts/'
};
// css source file: .scss files
var css = {
in: source + 'scss/main.scss',
out: dest + 'css/',
watch: source + 'scss/**/*',
sassOpts: {
outputStyle: 'nested',
precison: 3,
errLogToConsole: true,
includePaths: [bootstrapSass.in + 'assets/stylesheets', './bower_components/font-awesome/scss',]
}
};
var css2 = {
in: source + 'scss/estilos.scss',
out: dest + 'css/',
watch: source + 'scss/**/*',
sassOpts: {
outputStyle: 'nested',
precison: 3,
errLogToConsole: true,
}
};
// copy bootstrap required fonts to dest
gulp.task('fonts', function () {
return gulp
.src(fonts.in)
.pipe(gulp.dest(fonts.out));
});
gulp.task('icons', function() {
return gulp.src('./bower_components/font-awesome/fonts/**.*')
.pipe(gulp.dest('./fonts'));
});
// compile scss
gulp.task('sass', ['fonts','icons'], function () {
return gulp.src(css.in)
.pipe(sass(css.sassOpts))
.pipe(gulp.dest(css.out));
});
// compile scss
gulp.task('sass2', ['fonts','icons'], function () {
return gulp.src(css2.in)
.pipe(sass(css2.sassOpts))
.pipe(gulp.dest(css2.out));
});
// default task
gulp.task('default', ['sass','sass2'], function () {
gulp.watch(css.watch, ['sass','sass2']);
});
/*
gulp.task('icons', function() {
return gulp.src('./bower_components/fontawesome/fonts/**.*')
.pipe(gulp.dest('./dist/fonts'));
});
*/
//gulp.task('watch', function() {
// gulp.watch(config.sassPath + '/**/*.scss', ['scss']);
//});
//gulp.task('default', ['bower', 'icons', 'scss']);