-
Notifications
You must be signed in to change notification settings - Fork 135
/
stc.config.js
56 lines (52 loc) · 1.22 KB
/
stc.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
var stc = require('stc');
var htmlCompress = require('stc-html-compress');
var uglify = require('stc-uglify');
var cssCompress = require('stc-css-compress');
//var cdn = require('stc-cdn');
//var cdnAdapter = require('@q/stc-cdn-qstatic');
// var localstorage = require('stc-localstorage');
// var localstorageAdapter = require('stc-localstorage-ejs');
var version = require('stc-resource-version');
stc.config({
cluster: false,
product: 'thinkjs',
include: ['www/static', 'view_build'],
exclude: [/\.bak$/],
tpl: {
engine: 'ejs',
ld: ['<%'],
rd: ['%>'],
}
});
stc.workflow({
uglify: {plugin: uglify},
cssCompress: {
plugin: cssCompress,
exclude: [/\.min\./]
},
htmlCompress: {plugin: htmlCompress},
// localstorage: {
// include: [{type: 'tpl'}],
// exclude: [/\/doc\//],
// plugin: localstorage,
// options: {
// adapter: localstorageAdapter,
// minLength : 200,
// appId : 'd0ac6c56'
// }
// },
version: {
plugin: version,
include: [{type: 'tpl'}]
},
// cdn: {
// plugin: cdn,
// exclude: [/\/doc\//],
// options: {
// adapter: cdnAdapter,
// https: true,
// exclude: [/other\/icon/]
// }
// }
});
stc.start();