Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

customize-engine-less

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

customize-engine-less

A less-engine for customize

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.2K
increased by171.17%
Maintainers
1
Weekly downloads
 
Created
Source

customize-engine-less

NPM version Travis Build Status Coverage Status

A less-engine for customize

Installation

npm install customize-engine-less

Usage

The following example demonstrates how to use this module:

var customize = require('customize')

// Load files from one directory and merge with second
customize()
  .registerEngine('less', require('customize-engine-less'))
  // Add one less file
  .merge({
    less: {
      main: require.resolve('./main.less')
    }
  })
  // Add another less file overriding some variables
  .merge({
    less: {
      main: require.resolve('./override.less')
    }
  })
  .run()
  .done(console.log)

This will generate the following output

{ less: 
   { 'main.css': 'div{color:red;background-color:green}/*# sourceMappingURL=main.css.map */',
     'main.css.map': '{"version":3,"sources":["/home/nknappmeier/projects/bootprint/customize-engine-less/examples/main.less"],"names":[],"mappings":"AAGA,IACE,SAAA,CACA","sourcesContent":["@textcolor: blue;\\n@bgcolor: green;\\n\\ndiv {\\n  color: @textcolor;\\n  background-color: @bgcolor;  \\n}\\n\\n\\n\\n"]}' } }

API-reference

Functions

coerceToArray(objOrArray)

If objOrArray exists and is a non-array, it is replaced by an array with the property as single object.

Typedefs

CustomizeLessConfig : object

Configuration for the customize less-engine

coerceToArray(objOrArray) ⇒

If objOrArray exists and is a non-array, it is replaced by an array with the property as single object.

Kind: global function
Returns: objOrArray, if it is an array or an array containing objOrArray (if it is no array)

ParamTypeDescription
objOrArrayobjectthe object or an array

CustomizeLessConfig : object

Configuration for the customize less-engine

Kind: global typedef
Api: public
Properties

NameTypeDescription
mainstring | Array.<string>absolute path to a lesscss-file or a list of absolute paths to less files
pathsstring | Array.<string>absolute path (or a list of those) to paths to use as import path

License

customize-engine-less is published under the MIT-license. See LICENSE.md for details.

Release-Notes

For release notes, see CHANGELOG.md

Contributing guidelines

See CONTRIBUTING.md.

FAQs

Package last updated on 13 Feb 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc