Skip to content

jack4it/system-less

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

system-less?

A systemjs/builder plugin to load/render LESS in browser on the fly and bundle rendered CSS during build time.

Usage

Install system-less like this:

jspm install github:jack4it/system-less

Also install LESS (this step will create the right map entry that the plugin expects for LESS):

jspm install npm:less

In order to make systemjs builder bundle work, also install less and clean-css via npm:

npm install less clean-css

Configuration

To load less files in browser on the fly during development time, create meta for your less files in jspm/systemjs config.js file:

packages: {
  "example": {
    "meta": {
      "./*.less": {
        "loader": "jack4it/system-less"
      }
    }
  }
}

To minify/optimize the generated CSS in the bundle file, add these options when calling bundle method of systemjs builder:

builder.bundle('example/app.js', 'example/app-bundle.js', { minify: true, cssOptimize: true })

Example

example.html: An example of how to load LESS in browser on the fly during development time

example-bundle.js: An example of how to generate css from LESS in node during build time for production

License

MIT

About

A systemjs/builder plugin to load/render LESS in browser on the fly and bundle rendered CSS during build time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published