-
Notifications
You must be signed in to change notification settings - Fork 52
/
sass.js
105 lines (92 loc) · 2.86 KB
/
sass.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
// https://www.npmjs.com/package/node-sass
module.exports = {
/**
* outputFilename: The filename of the saved CSS file
* from the sass build. The directory which it is saved in
* is set within the "buildDir" config options.
*/
outputFilename: process.env.IONIC_OUTPUT_CSS_FILE_NAME,
/**
* sourceMap: If source map should be built or not.
*/
sourceMap: false,
/**
* outputStyle: How node-sass should output the css file.
*/
outputStyle: 'expanded',
/**
* autoprefixer: The config options for autoprefixer.
* Excluding this config will skip applying autoprefixer.
* https://www.npmjs.com/package/autoprefixer
*/
autoprefixer: {
browsers: [
'last 2 versions',
'iOS >= 8',
'Android >= 4.4',
'Explorer >= 11',
'ExplorerMobile >= 11'
],
cascade: false
},
/**
* includePaths: Used by node-sass for additional
* paths to search for sass imports by just name.
*/
includePaths: [
'node_modules/ionic-angular/themes',
'node_modules/ionicons/dist/scss',
'node_modules/ionic-angular/fonts'
],
/**
* includeFiles: An array of regex patterns to search for
* sass files in the same directory as the component module.
* If a file matches both include and exclude patterns, then
* the file will be excluded.
*/
includeFiles: [
/\.(s(c|a)ss)$/i
],
/**
* excludeFiles: An array of regex patterns for files which
* should be excluded. If a file matches both include and exclude
* patterns, then the file will be excluded.
* https://github.com/ionic-team/ionic/blob/master/src/themes/ionic.components.scss
*/
excludeFiles: [
/\.(wp|ios).(scss)$/i,
/(action-sheet|alert|badge|card|checkbox|chip|datetime|grid|item-reorder|item-sliding|label|loading|note|picker|popover|radio|range|select|select|slides|toggle|virtual-scroll|cordova)/i,
],
/**
* variableSassFiles: Lists out the files which include
* only sass variables. These variables are the first sass files
* to be imported so their values override default variables.
*/
variableSassFiles: [
'{{SRC}}/theme/variables.scss'
],
/**
* directoryMaps: Compiled JS modules may be within a different
* directory than its source file and sibling component sass files.
* For example, NGC places it's files within the .tmp directory
* but doesn't copy over its sass files. This is useful so sass
* also checks the JavaScript's source directory for sass files.
*/
directoryMaps: {
'{{TMP}}': '{{SRC}}'
},
/**
* excludeModules: Used just as a way to skip over
* modules which we know wouldn't have any sass to be
* bundled. "excludeModules" isn't necessary, but is a
* good way to speed up build times by skipping modules.
*/
excludeModules: [
'@angular',
'commonjs-proxy',
'core-js',
'ionic-native',
'rxjs',
'zone.js'
]
};