Skip to content

Commit 1ce20c8

Browse files
committed
add notes
1 parent a8f7cbb commit 1ce20c8

5 files changed

Lines changed: 149 additions & 1 deletion

File tree

src/app/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ export default class PluginGenerator extends Generator {
164164
this.fs.copy(this.templatePath('common/npmignore'), dest('.npmignore'));
165165
this.fs.copy(this.templatePath('common/nvmrc'), dest('.nvmrc'));
166166

167-
this.fs.copyTpl(this.templatePath('common/README.md'), dest('README.md'), this.props);
167+
this.fs.copyTpl(
168+
this.templatePath(`${this.props.pluginType}/README.md`),
169+
dest('README.md'),
170+
this.props
171+
);
168172

169173
this.fs.copy(this.templatePath(`${this.props.pluginType}/src`), dest('src'));
170174
// this.fs.copy(this.templatePath('common/index.ts'), dest('index.ts'));

src/app/templates/auth/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# <%= name %>
2+
3+
<%- (description || '').split('\n').map(function (line) {
4+
return '> ' + line
5+
}).join('\n') %>
6+
7+
---
8+
9+
## Usage
10+
11+
Add the plugin to your Verdaccio configuration file (`config.yaml`):
12+
13+
```yaml
14+
auth:
15+
<%= name %>:
16+
enabled: true
17+
```
18+
19+
## Development
20+
21+
See the [verdaccio contributing guide](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md) for instructions setting up your development environment.
22+
Once you have completed that, use the following npm tasks.
23+
24+
- `npm run build`
25+
26+
Build a distributable archive
27+
28+
- `npm run test`
29+
30+
Run unit test
31+
32+
- `npm run verify`
33+
34+
Verify the plugin can be loaded by Verdaccio. This runs [`@verdaccio/plugin-verifier`](https://www.npmjs.com/package/@verdaccio/plugin-verifier) which checks that the plugin exports the correct interface and can be instantiated as an **authentication** plugin.
35+
36+
For more information about any of these commands run `npm run ${task} -- --help`.

src/app/templates/filter/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# <%= name %>
2+
3+
<%- (description || '').split('\n').map(function (line) {
4+
return '> ' + line
5+
}).join('\n') %>
6+
7+
---
8+
9+
## Usage
10+
11+
Add the plugin to your Verdaccio configuration file (`config.yaml`):
12+
13+
```yaml
14+
filters:
15+
<%= name %>:
16+
enabled: true
17+
```
18+
19+
## Development
20+
21+
See the [verdaccio contributing guide](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md) for instructions setting up your development environment.
22+
Once you have completed that, use the following npm tasks.
23+
24+
- `npm run build`
25+
26+
Build a distributable archive
27+
28+
- `npm run test`
29+
30+
Run unit test
31+
32+
- `npm run verify`
33+
34+
Verify the plugin can be loaded by Verdaccio. This runs [`@verdaccio/plugin-verifier`](https://www.npmjs.com/package/@verdaccio/plugin-verifier) which checks that the plugin exports the correct interface and can be instantiated as a **filter** plugin.
35+
36+
For more information about any of these commands run `npm run ${task} -- --help`.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# <%= name %>
2+
3+
<%- (description || '').split('\n').map(function (line) {
4+
return '> ' + line
5+
}).join('\n') %>
6+
7+
---
8+
9+
## Usage
10+
11+
Add the plugin to your Verdaccio configuration file (`config.yaml`):
12+
13+
```yaml
14+
middlewares:
15+
<%= name %>:
16+
enabled: true
17+
```
18+
19+
## Development
20+
21+
See the [verdaccio contributing guide](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md) for instructions setting up your development environment.
22+
Once you have completed that, use the following npm tasks.
23+
24+
- `npm run build`
25+
26+
Build a distributable archive
27+
28+
- `npm run test`
29+
30+
Run unit test
31+
32+
- `npm run verify`
33+
34+
Verify the plugin can be loaded by Verdaccio. This runs [`@verdaccio/plugin-verifier`](https://www.npmjs.com/package/@verdaccio/plugin-verifier) which checks that the plugin exports the correct interface and can be instantiated as a **middleware** plugin.
35+
36+
For more information about any of these commands run `npm run ${task} -- --help`.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# <%= name %>
2+
3+
<%- (description || '').split('\n').map(function (line) {
4+
return '> ' + line
5+
}).join('\n') %>
6+
7+
---
8+
9+
## Usage
10+
11+
Add the plugin to your Verdaccio configuration file (`config.yaml`):
12+
13+
```yaml
14+
store:
15+
<%= name %>:
16+
enabled: true
17+
```
18+
19+
## Development
20+
21+
See the [verdaccio contributing guide](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md) for instructions setting up your development environment.
22+
Once you have completed that, use the following npm tasks.
23+
24+
- `npm run build`
25+
26+
Build a distributable archive
27+
28+
- `npm run test`
29+
30+
Run unit test
31+
32+
- `npm run verify`
33+
34+
Verify the plugin can be loaded by Verdaccio. This runs [`@verdaccio/plugin-verifier`](https://www.npmjs.com/package/@verdaccio/plugin-verifier) which checks that the plugin exports the correct interface and can be instantiated as a **storage** plugin.
35+
36+
For more information about any of these commands run `npm run ${task} -- --help`.

0 commit comments

Comments
 (0)