You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plugins can be thought of as filters. The README file gets split into
54
+
sections by headers (using a regex and assuming headers start with a `#`).
55
+
Those sections are passed as an array of Markdown strings to the plugin, which
56
+
can then loop through all the sections. Global plugins (for linting, etc) can
57
+
operate on every section. However most plugins will compare each section to a
58
+
regex and only update the specific section its concerned with. Plugins can also
59
+
loop through the sections and see that their section is missing and insert a new
60
+
section into the README.
77
61
78
-
Plugins can be either global or for a particular section.
79
-
Sections are identified by their title. So for instance, a plugin that
80
-
generates the license section of a README might look like this:
62
+
### API
81
63
82
-
```js
83
-
// basic license plugin
84
-
constpath=require('path')
64
+
Plugins should export a single function call with the following type signature:
65
+
66
+
```
85
67
/**
86
-
* @param{Section}section - Represents a section of the Markdown document (see details below)
87
-
* @param{object}pluginOptions - Options passed to only your plugin
88
-
* @param{object}globalOptions - Options passed to every plugin
89
-
* @return{Promise} - Asynchronous plugins must return a promise that resolves when the plugin is done. (Synchronous plugins do not need to return anything.)
68
+
* An update-readme plugin
69
+
* @param {string[]} sections - the sections of the README file
70
+
* @param {object} pluginOptions - any commandline options passed to the plugin
71
+
* @param {object} globalOptions - reserved for global options
72
+
*
73
+
* @return {string[] | Promise(string[])} - the processed Markdown sections
Try changing the value of 'license' in the package.json file and rerunning it.
129
+
161
130
## License
162
131
163
132
Copyright 2017 William Hilton.
164
-
Licensed under [The Unlicense](http://unlicense.org/).
133
+
This is free and unencumbered software released into the public domain.
134
+
135
+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
136
+
137
+
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and
138
+
successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
139
+
140
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
141
+
142
+
For more information, please refer to <http://unlicense.org/>
0 commit comments