Skip to content

Files

Latest commit

88263d7 · Oct 31, 2019

History

History
This branch is 3 commits ahead of, 1 commit behind gruckus-gruckus/typed-less-modules:master.

basic

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 31, 2019
Oct 31, 2019
Oct 31, 2019
Oct 31, 2019

Basic Example

This example contains:

  • Core variables (core/variables.less) 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 for includePaths.
  • 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):

yarn tlm "examples/basic/**/*.less" --includePaths examples/basic/core --aliases.~alias variables
  • The glob pattern is wrapped in quotes to pass it as a string and avoid executing.
  • includePaths with examples/basic/core so that @import 'variables' is found.
  • aliases with ~alias: variables meaning any @import '~alias' resolves to @import 'variables'.
  • No file will be output for variables.less since there are no classes.