sass.config.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // https://www.npmjs.com/package/node-sass
  2. module.exports = {
  3. /**
  4. * outputFilename: The filename of the saved CSS file
  5. * from the sass build. The directory which it is saved in
  6. * is set within the "buildDir" config options.
  7. */
  8. outputFilename: process.env.IONIC_OUTPUT_CSS_FILE_NAME,
  9. /**
  10. * sourceMap: If source map should be built or not.
  11. */
  12. sourceMap: false,
  13. /**
  14. * outputStyle: How node-sass should output the css file.
  15. */
  16. outputStyle: 'expanded',
  17. /**
  18. * autoprefixer: The config options for autoprefixer.
  19. * Excluding this config will skip applying autoprefixer.
  20. * https://www.npmjs.com/package/autoprefixer
  21. */
  22. autoprefixer: {
  23. browsers: [
  24. 'last 2 versions',
  25. 'iOS >= 8',
  26. 'Android >= 4.4',
  27. 'Explorer >= 11',
  28. 'ExplorerMobile >= 11'
  29. ],
  30. cascade: false
  31. },
  32. /**
  33. * includePaths: Used by node-sass for additional
  34. * paths to search for sass imports by just name.
  35. */
  36. includePaths: [
  37. 'src/themes',
  38. 'node_modules/ionicons/dist/scss',
  39. 'src/fonts'
  40. ],
  41. /**
  42. * includeFiles: An array of regex patterns to search for
  43. * sass files in the same directory as the component module.
  44. * If a file matches both include and exclude patterns, then
  45. * the file will be excluded.
  46. */
  47. includeFiles: [
  48. /\.(s(c|a)ss)$/i
  49. ],
  50. /**
  51. * excludeFiles: An array of regex patterns for files which
  52. * should be excluded. If a file matches both include and exclude
  53. * patterns, then the file will be excluded.
  54. */
  55. excludeFiles: [
  56. /* /\.(wp).(scss)$/i */
  57. ],
  58. /**
  59. * variableSassFiles: Lists out the files which include
  60. * only sass variables. These variables are the first sass files
  61. * to be imported so their values override default variables.
  62. */
  63. variableSassFiles: [
  64. './scripts/demos/variables.scss'
  65. ],
  66. /**
  67. * directoryMaps: Compiled JS modules may be within a different
  68. * directory than its source file and sibling component sass files.
  69. * For example, NGC places it's files within the .tmp directory
  70. * but doesn't copy over its sass files. This is useful so sass
  71. * also checks the JavaScript's source directory for sass files.
  72. */
  73. directoryMaps: {
  74. '{{TMP}}': '{{SRC}}'
  75. },
  76. /**
  77. * excludeModules: Used just as a way to skip over
  78. * modules which we know wouldn't have any sass to be
  79. * bundled. "excludeModules" isn't necessary, but is a
  80. * good way to speed up build times by skipping modules.
  81. */
  82. excludeModules: [
  83. '@angular',
  84. 'commonjs-proxy',
  85. 'core-js',
  86. 'ionic-native',
  87. 'rxjs',
  88. 'zone.js'
  89. ]
  90. };