The Less Unit


exports:  class LessUnit

class LessUnit

extends:  libflitter/Unit

A wrapper for the express-less package for Flitter. Makes .less assets available on the /style-asset route.


type:  String

Contains the fully-qualified path to the directory with the .less files.

constructor(String style_path = './app/assets/less')

overrides:  super.constructor()  returns:  this

Initializes the class. Resolves the fully-qualified path to the directory with the .less files and stores it in

go(express app, function next)

overrides:  super.go()  returns:  undefined

Initializes the unit. Registers the express-less package with the underlying Express app and points it to Compiled .less files are served at the route /style-asset. This establishes the Less context and executes the next function in the stack under it.

Less Context

Guarantees that the less files in the specified directory are available at /style-asset. Note that it this context need not be above the controllers, as long as it is established above the final App context.

No Comments
Back to top