This example contains:
- Core variables (
core/variables.scss) which contains things like colors, etc. To make the import of these variables easier, it's expected that this directory is included in the search path. This demonstrates the need forincludePaths. - An alias. This is most common when using a webpack alias. This demonstrates the need for
aliases.
The command to generate the proper type files would look like this (in the root of this repository):
npm run typed-scss-modules "examples/basic/**/*.scss" -- --includePaths examples/basic/core --aliases.~alias variables --banner '// example banner'- The glob pattern is wrapped in quotes to pass it as a string and avoid executing.
includePathswithexamples/basic/coreso that@import 'variables'is found.aliaseswith~alias: variablesmeaning any@import '~alias'resolves to@import 'variables'.- No file will be output for
variables.scsssince there are no classes.