UNPKG

1.95 kBMarkdownView Raw
1# robotstxt-webpack-plugin
2
3[![NPM version](https://img.shields.io/npm/v/robotstxt-webpack-plugin.svg)](https://www.npmjs.org/package/robotstxt-webpack-plugin)
4[![Travis Build Status](https://img.shields.io/travis/itgalaxy/robotstxt-webpack-plugin/master.svg?label=build)](https://travis-ci.org/itgalaxy/robotstxt-webpack-plugin)
5[![dependencies Status](https://david-dm.org/itgalaxy/robotstxt-webpack-plugin/status.svg)](https://david-dm.org/itgalaxy/robotstxt-webpack-plugin)
6[![devDependencies Status](https://david-dm.org/itgalaxy/robotstxt-webpack-plugin/dev-status.svg)](https://david-dm.org/itgalaxy/robotstxt-webpack-plugin?type=dev)
7[![Greenkeeper badge](https://badges.greenkeeper.io/itgalaxy/robotstxt-webpack-plugin.svg)](https://greenkeeper.io)
8
9Webpack plugin for
10[generate-robotstxt](https://github.com/itgalaxy/generate-robotstxt/) package.
11Generating `robots.txt` using webpack. Why your need
12[robots.txt](https://support.google.com/webmasters/answer/6062608?hl=en)?
13
14## Install
15
16```shell
17npm install --save-dev robotstxt-webpack-plugin
18```
19
20## Usage
21
22```js
23const RobotstxtPlugin = require("robotstxt-webpack-plugin").default;
24
25const options = {}; // see options below
26
27module.exports = {
28 plugins: [new RobotstxtPlugin(options)]
29};
30```
31
32Or
33
34```js
35import RobotstxtPlugin from "robotstxt-webpack-plugin";
36
37const options = {}; // see options below
38
39export default {
40 plugins: [new RobotstxtPlugin(options)]
41};
42```
43
44## Options
45
46* `General options` - see
47 [generate-robotstxt](https://github.com/itgalaxy/generate-robotstxt) options.
48* `filePath` - (optional) path for robots.txt (should be contain full path
49 include `robots.txt` file name, example - `path/to/robots.txt`).
50
51## Related
52
53* [generate-robotstxt](https://github.com/itgalaxy/generate-robotstxt) - api for
54 this package.
55
56## Contribution
57
58Feel free to push your code if you agree with publishing under the MIT license.
59
60## [Changelog](CHANGELOG.md)
61
62## [License](LICENSE)