Registry / devops / assets-bundler

assets-bundler

JSON →
library2.0.0jsnpmunverified

A Node.js library and CLI tool for bundling static assets by creating symbolic links in development and copying files in production. Version 2.0.0 uses glob patterns and variable substitution. It helps manage static files from multiple modules into a single public directory. The tool supports environment-specific behavior via NODE_ENV or --env flag, with forced deletion before symlinking or copying. It distinguishes itself by mimicking module resolution with glob variables, simplifying asset management across packages. Available programmatically or via command line.

npm install assets-bundler
INSTALL
IMPORT
SIG · ASSETS-BUNDLER
A
assets-bundler
devopsjavascriptv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

default
const bundle = require('assets-bundler');
import bundle from 'assets-bundler';
The package is CommonJS only; no ESM export available.
sync
const bundle = require('assets-bundler'); bundle.sync(opts);
const { sync } = require('assets-bundler');
sync is a method on the default export, not a named export.

Demonstrates programmatic usage with async and sync functions, using glob variable :module.

const bundle = require('assets-bundler'); const opts = { src: './node_modules/:module/public', dest: './public/:module' }; bundle(opts, function(err) { if (err) console.error(err); else console.log('Done'); }); // or sync version bundle.sync(opts);
Debug
Known issues
gotchaEnvironment detection uses NODE_ENV, but --env flag overrides it. Without either, defaults to production mode.
fix
Set NODE_ENV=development for symlinks or use --env dev.
affects: >=0.0.0
gotchaThe `force` option always deletes the destination before symlinking or copying, potentially removing existing unrelated files.
fix
Use caution when specifying destination; avoid using dest that contains other important files.
affects: >=0.0.0
deprecatedPackage has not been updated since 2016; glob patterns and dependencies may be outdated.
fix
Consider migrating to modern alternatives like webpack copy plugin or fs-extra.
affects: >0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'glob-ln'
Missing peer dependency glob-ln.
fix
Run `npm install glob-ln` in your project.
TypeError: bundle is not a function
Using ESM import on a CommonJS module.
fix
Use `const bundle = require('assets-bundler');` instead of `import bundle from 'assets-bundler';`.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
glob-lnrequiredCreates symbolic links in development mode
glob-cprequiredCopies files in production mode
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
assets-bundler — npm install assets-bundler · libregistry