Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

AngryBytes/angular-lessjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-lessjs

A small Less.js wrapper that exposes it as an AngularJS service for programmatic usage in the browser, and handles imports using $http and $templateCache.

angular.module('myModule', ['less'])
    .run(function($less) {
        $less.render('body { background: pink }').then(function(res) {
            console.log(res.css);
        });
    });

The $less service is Less.js itself, like anywhere else, but with these additional methods:

  • loadFile(filename): Alias for $lessFileManager.loadFile.

  • renderFile(filename, [options], [callback]): Load a file using loadFile then render it.

  • parseFile(filename, [options], [callback]): Load a file using loadFile then parse it.

The Less.js file manager implementation is exposed as $lessFileManager.

About

AngularJS glue for Less.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published