forked from didi/mand-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstylus-mixin.js
21 lines (20 loc) · 1.06 KB
/
stylus-mixin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const path = require('path')
const isSpecial = process.env.BUILD_TYPE === 'special'
module.exports = function useMixin(style) {
if (process.env.BUILD_TYPE === 'variables') {
return style
.import(path.join(__dirname, '../components/_style/mixin/theme.components.styl'))
.import(path.join(__dirname, '../components/_style/mixin/theme.basic.styl'))
.import(path.join(__dirname, '../components/_style/mixin/theme.variable.styl'))
.import(path.join(__dirname, '../components/_style/mixin/util.styl'))
.import(path.join(__dirname, '../node_modules/nib/lib/nib/vendor'))
.import(path.join(__dirname, '../node_modules/nib/lib/nib/gradients'))
} else {
return style
.import(path.join(__dirname, '../components/_style/mixin/theme.components.styl'))
.import(path.join(__dirname, '../components/_style/mixin/theme.basic.styl'))
.import(path.join(__dirname, '../components/_style/mixin/util.styl'))
.import(path.join(__dirname, '../node_modules/nib/lib/nib/vendor'))
.import(path.join(__dirname, '../node_modules/nib/lib/nib/gradients'))
}
}