# grunt-copy-node-modules

> Fast deploy Node.js modules from local source folder to distination folder by grunt.

Latest version **0.0.4** (published 2018-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-copy-node-modules
pnpm add grunt-copy-node-modules
yarn add grunt-copy-node-modules
bun add grunt-copy-node-modules
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2018-09-10 |
| First published | 2018-04-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | FingerArt |
| Maintainers | fingerart |
| Keywords | gruntplugin |

## Links

- npm: https://www.npmjs.com/package/grunt-copy-node-modules
- Repository: https://github.com/fingerart/grunt-copy-node-modules
- Homepage: https://github.com/fingerart/grunt-copy-node-modules#readme
- Issues: https://github.com/fingerart/grunt-copy-node-modules/issues
- npm.io page: https://npm.io/package/grunt-copy-node-modules

## Dependencies (1)

- [copy-node-modules](https://npm.io/package/copy-node-modules.md) ^1.0.7

## Recent versions

- 0.0.4 (latest) — 2018-09-10
- 0.0.3 — 2018-05-09
- 0.0.2 — 2018-04-28
- 0.0.1 — 2018-04-28

## README

# grunt-copy-node-modules

[![npm](https://img.shields.io/npm/v/grunt-copy-node-modules.svg)](https://www.npmjs.com/package/grunt-copy-node-modules)

Fast deploy Node.js modules to distination folder by grunt.
Copy all modules listed in 'dependencies' or 'devDependencies' field of package.json to destination folder.

The procedure:

1. Read package.json from source directoy, and read 'dependencies' or 'devDependencies' field.
2. Search existed modules in source directory, and search all dependencies.
3. Copy all modules to destination directory.

The modern applications use lots of modules, each module depends on more modules, results hundreds of modules need to be installed when typing `npm install`. When you want to pack/deploy your application to a folder which contains all needed modules, this module will help you to save time from slow `npm install`

It will save you a bunch of time to deploy stand-alone application from existed development directory, no need to fetch all modules from remote repository.

## Install

```
$ npm install --save-dev grunt-copy-node-modules
```

## Usage

```js
grunt.initConfig({
    'copy-node-modules': {
        options: {
            srcDir: './', // projectRoot, source directory contains package.json file.
            dstDir: './dist'
        }
    }
});

grunt.loadNpmTasks(grunt-copy-node-modules);

grunt.registerTask('default', ['copy-node-modules']);
```

## Options

- `srcDir`: source directory contains package.json file.
- `dstDir`: *required*, destination directory to copy modules, the modules will copy to `dstDir/node_modules` directory.
- `devDependencies`: default is *false*, also copy modules listed in `devDependencies` field.

## License

MIT © [Sindre Sorhus](https://sindresorhus.com)

---
_Source: https://npm.io/package/grunt-copy-node-modules · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
