-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulp-config.es6.js
112 lines (110 loc) · 2.68 KB
/
gulp-config.es6.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
102
103
104
105
106
107
108
109
110
111
112
const app = '.';
const bower = './bower_components';
const src = './src';
const development = './.dev'; //调试环境Jekyll生成的文件目录
const srcAssets = './src/assets'; // 调试环境 assets
const assets = './assets'; // blog assets 目录
var config = {
autoprefixer: {
browsers: [
'last 2 version',
'safari 5',
'ie 7',
'ie 8',
'ie 9',
'ios 6',
'android 4'
],
cascade: true
},
browsersync: {
server: {
baseDir: [
development
]
},
port: 9999,
ui: {
port: 9998
}
},
clean: {
dev: development,
build: assets
},
fonts: {
src: srcAssets + '/fonts/*',
dest: {
dev: development + '/assets/fonts',
build: assets + '/fonts'
}
},
images: {
src: srcAssets + '/images/**/*',
dest: {
dev: development + '/assets/images',
build: assets + '/images'
}
},
jekyll: {
src: app,
dest: development,
config: './_config.yml'
},
jshint: {
src: srcAssets + '/scripts/*.js'
},
scripts: {
babel: {
src: srcAssets + '/scripts/**/*.js',
dest: {
dev: development + '/assets/scripts',
build: assets + '/scripts'
},
options: {
presets: ['es2015']
}
}
},
styles: {
src: srcAssets + '/styles/*.css',
dest: {
dev: development + '/assets/styles',
build: assets + '/styles'
}
},
scsslint: {
src: [
srcAssets + '/styles/**/*.{sass,scss}'
],
options: {
}
},
sass: {
src: srcAssets + '/styles/*.{scss,sass}',
dest: {
dev: development + '/assets/styles',
build: assets + '/styles'
},
options: {
noCache: true,
compass: false,
bundleExec: true,
sourcemap: true
}
},
watch: {
jekyll: [
'./_config.yml',
app + '/_data/**/*.{json,yml,csv}',
app + '/_includes/**/*.{html,xml}',
app + '/_layouts/*.html',
app + '/_posts/*.{markdown,md}',
app + '/*.{html,markdown,md,yml,json,txt,xml}',
],
sass: srcAssets + '/styles/**/*.{sass,scss}',
scripts: srcAssets + '/scripts/**/*.js',
images: srcAssets + '/images/**/*'
}
};
export default config;