npm install reshape-cli[![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]
```
npm install --global reshape-cli
`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]
`
package.json
`json`
{
"name": "my project",
"dependencies": {
"reshape-include": "^1.0.2"
},
"reshape": {
"include": {
"root": "./"
}
}
}
`json
{
"name": "my project",
"dependencies": {
"reshape-include": "^1.0.2"
},
"reshape": {
"include": {
"root": "./"
}
}
}
`2. Create
index.html
`html
Here's my partial:
after the partial
`3. Create
_partial.html
`html
hello from the partial!
`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
Here's my partial:
hello from the partial!
after the partial
`Options
$3
config.js
`js
module.exports = {
parser: require('sugarml'),
plugins: {
include: {
root: './'
}
}
};
`
`bash
$ reshape -o output.html -i input.html -c config.js
`--
$3
`bash
$ reshape
-o output.html
-i input.html
-c config.js
-u reshape-custom-elements
`--
$3
`bash
$ reshape -o outputFolder/ -i inputFolder/*.html
``bash
$ reshape -o outputFolder/ -i inputFolder/*/.html
`--
$3
`bash
$ reshape -i input.html -r
``bash
$ reshape -i inputFolder/*.html -r
``[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