# Clean Output

> Removes the output directory

---

- [Install](#install)
- [API](#api)
  - [CleanOutput](#cleanoutput)
    - [See Also](#see-also)
    - [after](#after)
      - [Throws](#throws)
- [License](#license)

---

## Install

```
yarn add makestatic-clean-output
```

## API

### CleanOutput

Plugin to remove the output directory, makes sure your build is pristine.

This plugin is activated when the `clean` boolean option is set.

By default it will remove the entire `output` directory however if the
configuration option `clean` is set to an array of glob patterns then
only the files matching the configured glob patterns are removed.

#### See Also

* [Core Standard](https://makestatic.ws/docs/api/core-standard/ "Core Standard")

#### after

```javascript
after(context)
```

Removes the output directory.

Returns a promise that resolves when the output directory is removed.

* `context` Object the processing context.

##### Throws

* `Error` if the unlink operation fails.

## License

MIT

---

Created by [mkdoc](https://github.com/mkdoc/mkdoc) on March 12, 2017

[docs]: https://makestatic.ws/docs/ "Documentation"
[standalone manual]: https://github.com/makestatic/website/blob/master/MANUAL.md "Standalone Manual"
[yarn]: https://yarnpkg.com "Yarn"
[webpack]: https://webpack.js.org "Webpack"
[babel]: https://babeljs.io "Babel"
[postcss]: http://postcss.org "Postcss"
[sugarss]: https://github.com/postcss/sugarss "Sugarss"
[reshape]: https://github.com/reshape/reshape "Reshape Source Code"
[reshapeml]: https://reshape.ml "Reshape"
[clean-css]: https://github.com/jakubpawlowicz/clean-css "Clean CSS"
[html-minifier]: https://github.com/kangax/html-minifier "Html Minifier"
[uglify-js]: https://github.com/mishoo/UglifyJS2 "Uglify JS"
[imagemin]: https://github.com/imagemin/imagemin "Imagemin"
[mkdoc]: https://github.com/mkdoc/mkdoc "Mkdoc"
[browsersync]: https://www.browsersync.io "Browsersync"
[yeoman]: http://yeoman.io "Yeoman"
[spike]: https://www.spike.cf "Spike"
[validator]: https://github.com/validator/validator "HTML Validator"
[github pages]: https://pages.github.com "Github Pages"
[amazon s3]: https://aws.amazon.com/s3/ "Amazon S3"
[google sitemaps]: https://support.google.com/webmasters/answer/183668?hl=en&ref_topic=4581190 "Google Sitemaps"
[sitemaps]: https://www.sitemaps.org/ "Sitemaps"

