UNPKG

makestatic-core-standard

Version:

Standard lifecycle configuration

118 lines (87 loc) 4.14 kB
# Core Standard > Standard lifecycle configuration --- - [Install](#install) - [API](#api) - [StandardLifeCycle : LifeCycle](#standardlifecycle--lifecycle) - [See Also](#see-also) - [StandardLifeCycle : LifeCycle](#standardlifecycle--lifecycle-1) - [.getLifeCycleConfig](#getlifecycleconfig) - [License](#license) --- ## Install ``` yarn add makestatic-core-standard ``` ## API ### StandardLifeCycle : LifeCycle Standard lifecycle configuration for the core library. This standard configuration is used by the command line interface. Configures the lifecycle with standard plugins for these phases: + `clean`: Adds the `clean-output` plugin. + `build`: Adds the `http-cache` plugin. + `load`: Adds the `sources-loader` plugin. + `pack`: Adds the `pack-webpack` plugin unless `pack` is `false`. + `resolve`: Adds the `resolve-file` plugin. + `emit`: Adds the `emit-gzip` plugin if `gzip` is `true`. + `manifest`: Adds the `manifest` plugin if `manifest` is `true`. + `write`: Adds the `write-file` plugin. + `deploy`: Adds the `deploy-site` plugin if a provider is given. Plugins are merged with any existing definitions in the lifecycle so as not to conflict with user-defined lifecycle configurations for the phases that are modified however the plugins configured here take precedence in terms of execution order. In practice, due to the nature of the lifecycle execution the plugin order should not make any difference to the result as a plugin can only be guaranteed a previous plugin has completed execution if it exists in a preceeding phase. #### See Also * [Command Line Interface](https://makestatic.ws/docs/api/cli/ "Command Line Interface") * [Core Library](https://makestatic.ws/docs/api/core/ "Core Library") * [Clean Output](https://makestatic.ws/docs/api/clean-output/ "Clean Output") * [HTTP Agent](https://makestatic.ws/docs/api/http-cache/ "HTTP Agent") * [Sources Loader](https://makestatic.ws/docs/api/sources-loader/ "Sources Loader") * [Pack Webpack](https://makestatic.ws/docs/api/pack-webpack/ "Pack Webpack") * [Resolve File](https://makestatic.ws/docs/api/resolve-file/ "Resolve File") * [Emit Gzip](https://makestatic.ws/docs/api/emit-gzip/ "Emit Gzip") * [Write File](https://makestatic.ws/docs/api/write-file/ "Write File") * [Deploy Site](https://makestatic.ws/docs/api/deploy-site/ "Deploy Site") #### StandardLifeCycle : LifeCycle ```javascript new StandardLifeCycle(options) ``` Create a StandardLifeCycle. * `options` Object configuration options. #### .getLifeCycleConfig ```javascript StandardLifeCycle.prototype.getLifeCycleConfig(opts, argv) ``` Configures various plugins for the lifecycle phases. Returns lifecycle configuration map. * `opts` Object map of computed options. * `argv` Object configuration overrides. ## 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"