🚀 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
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

NCMP - NPM Client Modules Postprocessor

NPM David bitHound Overall Score

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

Usage

The core feature is to copy files which are runtime dependencies of your client application to another folder structure outside of node_modules automatically.

You have to create a ncmp.json configuration file in the root folder of your project:

{
    "destinations": {
        "*": "scripts/components",
        "css": "content/components"
    },
    "packages": {
        "jquery": ["dist/jquery.js", "dist/jquery.min.js"]
    },
    "plugins": []
}

It defines the destination folders depending on the file extension. The base path is the root folder. In this example we want to copy the distributions from jquery. The tool will perform the following copy actions:

  • ./node_modules/jquery/dist/jquery.js => ./scripts/components/jquery/jquery.js
  • ./node_modules/jquery/dist/jquery.min.js => ./scripts/components/jquery/jquery.min.js

The folder with the name of the package stays present.

You can use globs everywhere in the source file paths:

dist/*.js
dist/jquery.*
dist/*.min.js

In the "plugins" array you can define a set of plugins which can do more specific postprocessing.

Plugins

License

MIT

FAQs

Package last updated on 14 Mar 2016

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