Socket
Socket
Sign inDemoInstall

assets-expander

Package Overview
Dependencies
1
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    assets-expander

A well-tested Assets expander - specify assets graph in YAML file and easily expand them into a linear list


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

What is assets-expander?

assets-expander is a node.js library for expanding list(s) of files defined in YAML file into a flat list(s) of files.

Usage

How to install assets-expander?

npm install assets-expander

How to user assets-expander?

var AssetsExpander = require('assets-expander');
var expander = new AssetsExpander('assets.yml', { root: 'path/to/public/dir' });
expander.processGroup('stylesheets', 'public') // gets a flat list of assets in public group

How to define assets.yml file?

It depends what files you want to have in public group, but in general the file should look something like this.

stylesheets:
  public:
    - 'reset,shared,base,home'
    

Then if you have the following directory structure:

stylesheets
  - reset.css
  - shared.css
  - base.css
  - home.css
  

executing the code above will get you a list of full paths to these 4 files:

['.../stylesheets/reset.css', '.../stylesheets/shared.css', '.../stylesheets/base.css', '.../stylesheets/home.css']

License

Assets-expander is released under the MIT license.

Keywords

FAQs

Last updated on 17 Jun 2012

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc