This repository has been archived by the owner on Jul 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp.config.js
69 lines (66 loc) · 1.53 KB
/
gulp.config.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
'use strict'
import pkg from './package.json'
import bourbon from 'node-bourbon'
import notify from 'gulp-notify'
import gutil from 'gulp-util'
const isProduction = gutil.env.type === 'production'
const themePath = `./src/themes/${pkg.name}`
module.exports = {
isProduction: isProduction,
src: {
sass: './src/assets/sass',
javascripts: './src/assets/javascripts',
images: './src/assets/images',
components: './node_modules'
},
dist: {
css: `${themePath}/assets/css`,
js: `${themePath}/assets/js`,
images: `${themePath}/assets/images`,
fonts: `${themePath}/assets/fonts`,
},
plumberErrorHandler: {
errorHandler: notify.onError({
title: 'Gulp',
message: 'Error: <%= error.message %>'
})
},
cssnano: {
reduceIdents: false,
autoprefixer: {
browsers: [
'last 2 versions',
'safari >= 8',
'ie >= 10',
'ff >= 20',
'ios 6',
'android 4'
], add: true
}
},
includeConfig: {
extensions: 'js',
includePaths: [
'./node_modules',
'./src/assets/javascripts'
]
},
sassConfig: {
sourceComments: isProduction ? false : 'normal',
includePaths: [
bourbon.includePaths,
'./node_modules',
'./src/assets/sass'
]
},
banner: [
'/**!',
'* <%= pkg.name %> - <%= pkg.description %>',
'* @version v<%= pkg.version %>',
'* @author v<%= pkg.author %>',
'* @link <%= pkg.homepage %>',
'* @license <%= pkg.license %>',
'* @support <%= pkg.bugs.url %>',
'*/'
]
}