less_node 0.1.3 copy "less_node: ^0.1.3" to clipboard
less_node: ^0.1.3 copied to clipboard

outdatedDart 1 only

Less transformer wrapped over nodejs. Build a .css file from .less files.

Less integration for pub #

Less-transformer for pub-serve and pub-build.

Usage #

Simply add the following lines to your pubspec.yaml:

dependencies:
  less_node: any
transformers:
  - less_node:
  		entry_point: web/builder.less

After adding the transformer your entry_point .less file will be automatically transformed to corresponding .css file.

You need to have Less installed and available on the path, as a nodejs npm module.

Configuration #

You can also pass options to Lessc if necessary:

transformers:
  - less_node:
      entry_point: path/to/builder.less
      output: /path/to/builded.css
      include_path: /path/to/directory/for/less/includes
      cleancss: true or false
      compress: true or false
      executable: /path/to/lessc
      build_mode: less, dart or mixed
      run_in_shell: true or false
  • entry_point - Is the ONLY option required. Normally is a builder file with "@import 'filexx.less'; ..." directives.
  • output - Is the .css file generated. If not supplied then entry_point with .css extension is used.
  • include_path - see Less Documentation include_path.
  • cleancss - see Less Documentation clean-css.
  • compress - see Less Documentation compress.
  • executable - by default 'lessc' as node npm work result
  • build_mode -
    • less - command 'CMD> lessc --flags input.less > output.css' is used
      • dart - command 'CMD> lessc --flags -' with stdin and stdout piped in the dart transformer process.
      • mixed - command 'CMD> lessc --flags input.less' with stdout managed by the dart transformer process.
  • run_in_shell - in windows lessc.cmd needs a shell, so run_in_shell default is true for this platform.
0
likes
0
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

Less transformer wrapped over nodejs. Build a .css file from .less files.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

barback, utf

More

Packages that depend on less_node