0.2.2 • Published 7 years ago

ncmp-copy-plugin v0.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

ncmp-copy-plugin

Deprecated - Not actively maintained!!

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

NCMP plugin for copying files from node_modules into another file structure.

Installation

npm install ncmp-copy-plugin

Usage

Use this to copy files which are runtime dependencies of your client application to another folder structure outside of node_modules.

You have to extend the ncmp.json configuration file as described below:

{
    "destinations": {
        "*.css": "content/components",
        "aurelia-*.js": "scripts/components/aurelia/*",
        "*": "scripts/components",
    },
    "plugins": ["copy"]
}

Add the word "copy" to the correct position in the "plugins" array.

It defines the destination folders depending on a regular expression which is executed against the file basename. 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:

SourceDestination
./node_modules/jquery/dist/jquery.js./scripts/components/jquery.js
./node_modules/jquery/dist/jquery.min.js./scripts/components/jquery.min.js
./node_modules/aurelia-framework/dist/amd/aurelia-framework.js./scripts/components/aurelia/framework/aurelia-framework.js
./node_modules/aurelia-templating/dist/amd/aurelia-templating.js./scripts/components/aurelia/templating/aurelia-templating.js

You can also define a single source file instead of an array. Files are only copied if they does not exists in the destination or the file hash differs.

You can use globs everywhere in the source file paths:

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

See main documentation for additional information.

License

MIT

0.2.2

7 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.2.0-beta

8 years ago

0.1.0-beta

8 years ago