Registry / web-framework / ember-cli-node-assets

ember-cli-node-assets

JSON →
library0.2.2jsnpmunverified

Ember CLI Node Assets is an Ember CLI addon designed to simplify the inclusion of stylesheets, images, and JavaScript assets directly from npm packages into Ember applications and other Ember addons. As of its last major update, v0.2.2, released in 2020, the package appears to be in an abandoned state with no recent maintenance or updates. Its primary function is to funnel specified files from an npm package into an Ember application's `vendor` (for `app.import` consumption) or `public` (for direct public access) directories during the build process. It differentiates itself by providing a consistent configuration API, handling npm package layout variations (npm 2 vs 3), and abstracting away direct interaction with Broccoli plugins, which are the underlying build tools for Ember CLI. It encourages a pattern of explicitly funneling assets rather than implicit imports, allowing for fine-grained control over asset placement and inclusion.

web-frameworkdevopsdata
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.

This addon does not export JavaScript symbols for direct import. Its functionality is configured via the `nodeAssets` key within the `EmberApp` options in `ember-cli-build.js` for applications, or within the `options` hash of an addon's `index.js`.

let app = new EmberApp(defaults, { nodeAssets: { /* ... config ... */ } });

After configuring `ember-cli-node-assets` to funnel files into the `vendor` tree, developers use the standard Ember CLI `app.import()` method to explicitly include those assets in their build. This is not an import *from* `ember-cli-node-assets` but a usage pattern that relies on it.

app.import('vendor/slick-carousel/slick.js');

When used within an Ember addon, `ember-cli-node-assets` is configured by placing the `nodeAssets` object within the `options` property of the addon's `module.exports` object in its `index.js` file.

module.exports = { name: 'my-addon', options: { nodeAssets: { /* ... config ... */ } } };

This example demonstrates how to configure `ember-cli-node-assets` in an Ember application's `ember-cli-build.js` to funnel assets from the `slick-carousel` npm package into both the `vendor` and `public` trees, followed by `app.import` calls for vendor assets.

/* ember-cli-build.js for an Ember application */ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { let app = new EmberApp(defaults, { nodeAssets: { 'slick-carousel': { vendor: { srcDir: 'slick', destDir: 'slick-carousel', include: ['slick.js', 'slick.css', 'slick-theme.css'] }, public: { srcDir: 'slick', destDir: 'assets', include: ['ajax-loader.gif', 'fonts/*'] } } } }); // Import assets that were funneled into the vendor tree app.import('vendor/slick-carousel/slick.js'); app.import('vendor/slick-carousel/slick.css'); app.import('vendor/slick-carousel/slick-theme.css'); return app; };
Debug
Known footguns
breakingUpgrading to v0.2.0 impacts how addons included as transitive dependencies behave. Addon authors should review their asset inclusion strategy.
gotchaThe `this` context for dynamic configuration functions was previously incorrect and was fixed in v0.2.0-beta.2. If you relied on an incorrect `this` value, your dynamic configurations may break or behave unexpectedly after upgrading.
gotchaStarting with v0.2.0-beta.1, documentation and recommended practice shifted towards explicit funneling of files into `vendor` and `public` trees, rather than relying on implicit imports. While older shorthand for importing specific files still works, it's now a funneling shortcut.
deprecatedThe package `ember-cli-node-assets` appears to be abandoned, with no updates or commits since February 2020. It may not be compatible with newer versions of Ember CLI or Node.js, and potential security vulnerabilities will not be patched.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources