Socket
Socket
Sign inDemoInstall

component-less

Package Overview
Dependencies
2
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    component-less

A plugin to transpile Less files for the component builder.


Version published
Weekly downloads
10
increased by150%
Maintainers
2
Install size
15.1 MB
Created
Weekly downloads
 

Changelog

Source

v0.2.3

  • Fix an issue with renaming files which could make Component trying to read a non-existing file. Showing the following error: ENOENT, open '/folder/component-name/styles.css'

Readme

Source

component-less

A plugin to transpile Less files for the component builder.

Install

$ npm install component-less

Usage

Add your .less files to the styles array in your component.json:

{
	"styles": [
		"base.less",
		"button.css"
	]
}

Use the plugin during your build process:

var Builder = require('component-builder');
var less = require('component-less');
var fs = require('fs');

var builder = new Builder(__dirname);

builder.use(less);

builder.build(function (err, res) {
	if (err) {
		throw err
	}

	fs.writeFileSync('build/build.js', res.require + res.js);

	if (res.css) {
		fs.writeFileSync('build/build.css', res.css);
	}
});

License

MIT

Keywords

FAQs

Last updated on 04 Dec 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc