🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

ncmp

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

ncmp

NPM client modules postprocessor

unpublished
latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

NCMP - NPM Client Modules Postprocessor

Deprecated - Not actively maintained!!

NPM David bitHound Overall Score Join the chat at https://gitter.im/ncmp/ncmp

NCMP is a simple tool which allows you to perform some postprocessing after npm installs or updates. It is mainly designed for usage in client infrastructures. So if you use npm as your main client package manager.

Installation

npm install ncmp

Configuration

One of the goals of this project is to provide a modular as possible tool for npm postprocessing in web client infrastructures. The developers should have full control about all steps at any time.

The following snippet shows a example ncmp.json configuration file:

{
    "packages": {
        "jquery": ["dist/jquery.js", "dist/jquery.min.js"],
        "aurelia-framework": "dist/amd/aurelia-framework.js",
        "aurelia-templating": "dist/amd/aurelia-templating.js"
    },
    "ignore": [
        "bootstrap"
    ],
    "plugins": []
}

packages

Contains all "registered" packages for further postprocessing. It's a mapping of package names to files for processing.

ignore

All package names listed here are ignored for further steps.

plugins

Lists a set of plugins (in their execution order) which can do more specific postprocessing.

Command-line interface

NCMP has a command-line interface. The following commands are available:

init

With ncmp init you can initialize your local ncmp installation. It creates you a new ncmp.json (if it does not exists) with the default values in it.

install

This is the main command from ncmp. It executes all configured plugins in a chain.

scan

Detects all new installed or uninstalled packages (listed under "dependencies" in package.json) and modifies the ncmp.json in this way. Use -s or --silent to avoid user prompts.

Plugins

Writing Plugins

There are some requirements for new plugins:

  • The name of the plugin npm module has to be ncmp-XXX-plugin. Where XXX is the string for the "plugins" config section.
  • The main file has to define and export a function with this signature: runPlugin(chain). The chain has to be returned directly or as promise.
  • To retrieve the config you have to reference ncmp as a peerDependency. You can fetch the config with configManager.load() with the exported configManager variable.
  • If you want to change the config in your plugin you have to use configManager.save(newConfig).
  • Create a pull request for this README and extend the list of plugins above.

License

MIT

Keywords

ncmp

FAQs

Package last updated on 28 Jan 2017

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