Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
assets-expander
Advanced tools
A well-tested tool for expanding any files structure defined in YAML file into a flat list of files
Assets-expander is a node.js library that turns a glob-like declarations from YAML file into a list of files. Just see below for examples.
npm install assets-expander
var AssetsExpander = require('assets-expander');
var expander = new AssetsExpander('assets.yml', { root: 'path/to/public/dir' });
expander.processGroup('javascripts', 'public') // gets a flat list of assets in public group
Just go with something like:
javascripts:
public:
vendor: 'undescore,modernizr'
public: '**/*'
stylesheets:
public:
- 'reset,shared,base,home'
Then if you have the following directory structure:
javascripts
- vendor
- underscore.js
- modernizr.js
- public
- main.js
- fallback.js
stylesheets
- reset.css
- shared.css
- base.css
- home.css
then running the following code will give you the files you need:
> expander.processGroup('stylesheets', 'public')
> ['stylesheets/reset.css', 'stylesheets/shared.css', 'stylesheets/base.css', 'stylesheets/home.css']
> expander.processGroup('javascripts', 'public')
> ['javascripts/vendor/underscore.js', 'javascripts/vendor/modernizr.js', 'javascripts/public/main.js', 'javascripts/public/fallback.js']
Assets-expander is released under the MIT license.
FAQs
A well-tested tool for expanding any files structure defined in YAML file into a flat list of files
The npm package assets-expander receives a total of 7 weekly downloads. As such, assets-expander popularity was classified as not popular.
We found that assets-expander demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.