# npm-script-flatten

> flatten npm script

Latest version **0.2.0** (published 2019-08-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install npm-script-flatten
pnpm add npm-script-flatten
yarn add npm-script-flatten
bun add npm-script-flatten
```

Provides the command `npm-script-flatten`.

## 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.2.0 |
| Published | 2019-08-23 |
| First published | 2019-08-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | chyingp |
| Keywords | npm script |

## Links

- npm: https://www.npmjs.com/package/npm-script-flatten
- Repository: https://github.com/chyingp/npm-script-flatten
- Homepage: https://github.com/chyingp/npm-script-flatten#readme
- Issues: https://github.com/chyingp/npm-script-flatten/issues
- npm.io page: https://npm.io/package/npm-script-flatten

## Recent versions

- 0.2.0 (latest) — 2019-08-23
- 0.1.0 — 2019-08-23

## README

# npm-script-flatten

`npm-script-flatten` is a small tool for flattening npm script.


## usage

```bash
npm install -g npm-script-flatten
npm-script-flatten deploy # your script to be flattened
```

## example

For example, npm script `deploy` defined in `package.json`

```json
"scripts": {
	"deploy": "npm run build-ios --test && npm run build-android && npm run deploy-remote",
	"build": "npm run build-ios && npm run build-android",
	"build-ios": "cp index.js index.io.js",
	"build-android": "cp index.js ios.android.js",
	"deploy-remote": "cp index.*.js /tmp"
}
```

When we run `npm-script-flatten deploy`, you will get the commands actually run.

```bash
cp index.js index.io.js --test
cp index.js ios.android.js
cp index.*.js /tmp
```

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