# create-defaults

> simple file generator for commonly created files

Latest version **0.0.5** (published 2019-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install create-defaults
pnpm add create-defaults
yarn add create-defaults
bun add create-defaults
```

Provides the command `defaults`.

## 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.5 |
| Published | 2019-12-14 |
| First published | 2019-08-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | annie tran |
| Maintainers | nntrn |
| Keywords | generator |

## Links

- npm: https://www.npmjs.com/package/create-defaults
- npm.io page: https://npm.io/package/create-defaults

## Recent versions

- 0.0.5 (latest) — 2019-12-14
- 0.0.4 — 2019-12-06
- 0.0.3 — 2019-10-30
- 0.0.2 — 2019-08-07
- 0.0.1 — 2019-08-07

## README

# create-defaults

A simple generator for creating default files in a directory

## Install

This package should be installed globally or linked using [`npm link`](https://docs.npmjs.com/cli/link)

```
npm install create-defaults --global
```

## Usage

### Create/update all files listed in `.defaults`

```sh
$ defaults
```

### Create/update **specified** file(s)

```sh
$ defaults file-name1 file-name2
```

specified files that aren't in `.defaults` will be ignored

## Configuration File

Configuration settings are determined by the closest `.defaults` file to the current directory

```
{
  "writeFiles": [
    {
      "name": "",
      "value": [],
      "update" true | false
    },
    ...
  ]
}
```

example:

```json
{
  "writeFiles": [
    {
      "name": ".gitignore",
      "value": ["node_modules", ".vscode"],
      "update": true
    },
    {
      "name": "src/components/index.js"
    }
  ]
}
```

- `update: true` will update and override `.gitignore` with default values (should be used with caution)

- `src/components/index.js` will recursively create **`src/`** and **`components/`** (if it doesn't already exist) and then create `index.js`

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