Skip to content

hollowdoor/electron_less

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

electron-less

Install

npm install --save electron-less

Usage

const eless = require('electron-less');
eless({
    //options.source is required
    source: 'styles.less',
    //options.id is optional.
    //options.id defaults to hasha(source)
    id: 'myStyles',
    //options.variables is optional
    //options.variables gets turned into less variables
    //that get prefixed to the options.source file text
    variables: {
        color: 'red'
    },
    //options.paths is optional
    //option.paths specify search paths for @import directives
    paths: ['.', './lib'],
}).then(()=>{
    console.log('Styles appended to head element')
});

About

electron-less uses less css preprocessor to parse .less files, and appends that css to the head in an electron view (electron Renderer Process).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages