Registry / ember-cli-less

ember-cli-less

JSON →
library3.0.2jsnpmunverified

Ember CLI addon to compile Less CSS into your Ember app's CSS. Current stable version is 3.0.2. Maintained as an Ember ecosystem addon, integrates with Ember CLI build pipeline. Supports multiple input/output CSS files, source maps, and nested addon usage. Alternatives include ember-cli-sass for SCSS. Requires Ember.js v3.12+, Ember CLI v2.13+, and Node.js v10+.

npm install ember-cli-less
INSTALL
IMPORT
SIG · EMBER-CLI-LESS
E
ember-cli-less
javascriptv3.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ember-cli-less (addon installation)
npm install --save-dev ember-cli-less
npm install --save ember-cli-less
Addon should be in devDependencies, not dependencies.
lessOptions configuration
let app = new EmberApp({ lessOptions: { paths: [...] } });
let app = new EmberApp({ lessOptions: { path: [...] } });
Use 'paths' (array) for include paths, not 'path'.
outputPaths configuration
let app = new EmberApp({ outputPaths: { app: { css: { app: '/assets/my-app.css' } } } });
let app = new EmberApp({ outputPaths: { 'app.css': '/assets/my-app.css' } });
Use the nested object format with 'app.css' key under 'app'.

Install ember-cli-less and Less compiler, configure include paths and source maps, then import Bootstrap Less in app.less.

// Install the addon npm install --save-dev ember-cli-less less // In ember-cli-build.js let app = new EmberApp(defaults, { lessOptions: { paths: [ 'node_modules/bootstrap-less/bootstrap' ], sourceMap: true } }); // Then in app/styles/app.less: @import 'bootstrap'; // Your custom Less styles
Debug
Known issues
gotchaLess compiler must be installed separately as a peer dependency.
fix
Run 'npm install --save-dev less' alongside ember-cli-less.
affects: >=1.0.0
gotchaWhen using multiple output paths, source map names are auto-generated from output path and cannot be customized.
fix
Accept the generated .map filename; manual naming is not supported.
affects: >=1.5.0
breakingBreaking change in v3.0.0: Requires Node.js >=10, Ember.js >=3.12, Ember CLI >=2.13.
fix
Update your project to meet minimum versions. See CHANGELOG.
affects: >=3.0.0
deprecatedThe 'mergeTrees' option is deprecated in favor of using broccoli-merge-trees directly.
fix
Use broccoli-merge-trees in your own build process instead of through lessOptions.
affects: >=1.5.0
gotchaAddon styles are compiled from 'addon/styles/addon.less' into merged addon CSS; direct imports in app.less may not work.
fix
For addons, create 'app/styles/app.less' in the addon and use @import to include addon styles.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'less'
Missing peer dependency 'less'.
fix
Run 'npm install --save-dev less' in your project.
Unrecognized option: path (in lessOptions)
Using 'path' instead of 'paths' for include paths.
fix
Change to 'paths: [...]' as an array.
ENOENT: no such file or directory, open '.../app/styles/app.less'
Missing app.less file when addon expects it.
fix
Create 'app/styles/app.less' even if empty, or adjust input path.
Upgrade
Version history
3.0.2latest on npm
Audit
Dependencies
lessrequiredLess compiler peer dependency; must be installed separately
broccoli-less-singleoptionalInternal dependency for compiling single Less files
broccoli-merge-treesoptionalInternal dependency for merging tree outputs
Agent activity
6 hits · last 30 days
node
6
Resources
ember-cli-less — npm install ember-cli-less · libregistry