Skip to content

Latest commit

 

History

History
 
 

basic

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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 examples/basic/core/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.