Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

assets-expander

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 0.2.0
  • Source
  • npm
  • Socket score

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

What is assets-expander?

assets-expander is a node.js library for expanding lists of files defined in YAML file into a flat lists.

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']

Keywords

FAQs

Package last updated on 07 Apr 2011

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc