# reshape-cli

> CLI for reshape

Latest version **0.0.1** (published 2017-02-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install reshape-cli
pnpm add reshape-cli
yarn add reshape-cli
bun add reshape-cli
```

Provides the command `reshape`.

## 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.1 |
| Published | 2017-02-17 |
| First published | 2017-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Ivan Demidov |
| Maintainers | scrum |
| Keywords | reshape, reshape-runner, cli |

## Links

- npm: https://www.npmjs.com/package/reshape-cli
- Repository: https://github.com/gitscrum/reshape-cli
- Homepage: https://github.com/gitscrum/reshape-cli#readme
- Issues: https://github.com/gitscrum/reshape-cli/issues
- npm.io page: https://npm.io/package/reshape-cli

## Dependencies (4)

- [yargs](https://npm.io/package/yargs.md) ^6.6.0
- [globby](https://npm.io/package/globby.md) ^6.1.0
- [reshape](https://npm.io/package/reshape.md) ^0.4.1
- [post-load-plugins](https://npm.io/package/post-load-plugins.md) 0.0.13

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2017-02-17

## README

# reshape-cli
> Simple CLI for [reshape][reshape-url]

[![node][node-image]][node-url][![NPM version][npm-image]][npm-url][![Trasiv Build Status][travis-image]][travis-url][![AppVeyor Build Status][appveyor-img]][appveyor][![Coveralls Status][coveralls-image]][coveralls-url][![Dependency Status][depstat-image]][depstat-url][![Standard Code Style][style]][style-url]

## Install

```
npm install --global reshape-cli
```

## Usage

```bash
$ reshape --help

  Usage
  reshape [-o output-file/directory|-r] [-i input-file/directory] [--config|-c path/to/file/config] [--use|-u plugin]

  Options
  --config,  -c Path to JS file                    [string]
  --output,  -o Output html file/folder result     [required]
  --input,   -i Input html file/folder             [required]
  --use,     -u reshape plugin name                [string]
  --replace, -r Replace input file(s)              [boolean]
  --help,    -h Show help                          [boolean]
  --version, -v Show version number                [boolean]
```

## Config
*Automatically loads plug-ins with configuration from package.json using [post-load-plugins](https://github.com/post-org/post-load-plugins)*

package.json
```json
{
  "name": "my project",
  "dependencies": {
    "reshape-include": "^1.0.2"
  },
  "reshape": {
    "include": {
      "root": "./"
    }
  }
}
```

## Sample example
1. Create config in `package.json`

  ```json
  {
    "name": "my project",
    "dependencies": {
      "reshape-include": "^1.0.2"
    },
    "reshape": {
      "include": {
        "root": "./"
      }
    }
  }
  ```

2. Create `index.html`

  ```html
  <p>Here's my partial:</p>
  <include src='_partial.html'></include>
  <p>after the partial</p>
  ```

3. Create `_partial.html`
  ```html
  <strong>hello from the partial!</strong>
  ```

4. Run the command in the terminal
  ```bash
  $ reshape -i path/to/input/index.html -o pat/to/output/result.html
  ```
  *Will be automatically found plugin `reshape-include` assembled configuration for it `{ "root": "./"}` and it will be initialized.*

5. Enjoy `result.html`
  ```html
  <p>Here's my partial:</p>
  <strong>hello from the partial!</strong>
  <p>after the partial</p>
  ```

## Options 
### `config`
config.js  
```js
module.exports = {
  parser: require('sugarml'),
  plugins: {
    include: {
      root: './'
    }
  }
};
```
```bash
$ reshape -o output.html -i input.html -c config.js
```

--

### `use`
```bash
$ reshape 
  -o output.html 
  -i input.html 
  -c config.js
  -u reshape-custom-elements
```

--


### `dir`
```bash
$ reshape -o outputFolder/ -i inputFolder/*.html
```

```bash
$ reshape -o outputFolder/ -i inputFolder/**/*.html
```

--


### `replace`
```bash
$ reshape -i input.html -r
```

```bash
$ reshape -i inputFolder/*.html -r
```

### License [MIT](license)

[reshape-url]: http://github.com/reshape/reshape

[node-url]: ""
[node-image]: https://img.shields.io/node/v/reshape-cli.svg?maxAge=2592000&style=flat-square

[npm-url]: https://npmjs.org/package/reshape-cli
[npm-image]: http://img.shields.io/npm/v/reshape-cli.svg?style=flat-square

[travis-url]: https://travis-ci.org/GitScrum/reshape-cli
[travis-image]: http://img.shields.io/travis/GitScrum/reshape-cli/master.svg?style=flat-square&label=unix

[appveyor]:     https://ci.appveyor.com/project/GitScrum/reshape-cli
[appveyor-img]: https://img.shields.io/appveyor/ci/GitScrum/reshape-cli/master.svg?style=flat-square&label=windows

[coveralls-url]: https://coveralls.io/r/GitScrum/reshape-cli
[coveralls-image]: http://img.shields.io/coveralls/GitScrum/reshape-cli.svg?style=flat-square

[depstat-url]: https://david-dm.org/GitScrum/reshape-cli
[depstat-image]: https://david-dm.org/GitScrum/reshape-cli.svg?style=flat-square

[depstat-dev-url]: https://david-dm.org/GitScrum/reshape-cli
[depstat-dev-image]: https://david-dm.org/GitScrum/reshape-cli/dev-status.svg?style=flat-square

[style-url]: https://github.com/sindresorhus/xo
[style]: https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square

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