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 |
|
9 | Webpack plugin for
|
10 | [generate-robotstxt](https://github.com/itgalaxy/generate-robotstxt/) package.
|
11 | Generating `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
|
17 | npm install --save-dev robotstxt-webpack-plugin
|
18 | ```
|
19 |
|
20 | ## Usage
|
21 |
|
22 | ```js
|
23 | const RobotstxtPlugin = require("robotstxt-webpack-plugin").default;
|
24 |
|
25 | const options = {}; // see options below
|
26 |
|
27 | module.exports = {
|
28 | plugins: [new RobotstxtPlugin(options)]
|
29 | };
|
30 | ```
|
31 |
|
32 | Or
|
33 |
|
34 | ```js
|
35 | import RobotstxtPlugin from "robotstxt-webpack-plugin";
|
36 |
|
37 | const options = {}; // see options below
|
38 |
|
39 | export 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 |
|
58 | Feel free to push your code if you agree with publishing under the MIT license.
|
59 |
|
60 | ## [Changelog](CHANGELOG.md)
|
61 |
|
62 | ## [License](LICENSE)
|