Socket
Book a DemoInstallSign in
Socket

emily-cm

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emily-cm

Frontend Component Manager

1.3.3
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

emily-cm

Emily is a component manager and offers easy integration with your workflow while not restricting structural freedom. Install using: npm install emily-cm -g

Commands

  • emily init <dir> Generates the emily.json
  • emily new <module> Generates a module with the given name
  • emily activate <module> Activates the given module
  • emily deactivate <module> Dectivates the given module
  • emily list Lists all modules

emily.json

After the basic installation via emily init <dir>. You can further customize the emily.json to fit your needs.

Build task integration

Emily offers some basic methods to retrieve the module paths and integrate them in your build task:

const emily = require('emily-cm');

// Tries to return the full config file
emily.config();

// Returns an array containing all modules
emily.all();

// Returns an array containing all active modules
emily.active();

// Returns an array containing all inactive modules
emily.inactive();

// Generates a path-array from the given module array
emily.toPaths(emily.all());

Example with gulp

const gulp = require('gulp');
const emily = require('emily-cm');
 
gulp.task('scripts', function() {

  // Get all .js files in every active module
  let scripts = emily.toPaths(emily.active()).map((el)=>el + '**/*.js'));
  
  return gulp.src(scripts)
    .pipe(gulp.dest('dist/js'));
});

Keywords

component

FAQs

Package last updated on 01 Sep 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.