-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedp-rider-config.js
More file actions
46 lines (35 loc) · 1019 Bytes
/
edp-rider-config.js
File metadata and controls
46 lines (35 loc) · 1019 Bytes
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
/**
* @file rider/stylus 配置
* @author edpx-mobile
*/
// 引入 rider 支持
var epr = require('edp-provider-rider');
var path = require('path');
// 初始化 stylus 插件
epr.stylusPlugin = epr.plugin({
// 隐式引入 rider
implicit: true,
// 是否解析 url 中的路径
resolveUrl: true,
// 追加 stylus 配置,可在此处引入 stylus 插件
// @see: http://learnboost.github.io/stylus/docs/js.html#usefn
use: function (style) {
var paths = style.options.paths;
var depPath = path.resolve(__dirname, 'dep');
style.set('paths',
paths.concat(depPath)
);
style.set('include css', true);
},
// husl 插件,需要时启用
// @see: http://www.boronine.com/husl/
// husl: true,
// autoprefixer 配置
// @see: https://github.com/postcss/autoprefixer-core#usage
autoprefixer: [
'Android >= 2.3',
'iOS >= 5',
'ExplorerMobile >= 10'
]
});
module.exports = epr;