Skip to content

Commit 38a9a44

Browse files
authored
docs: improve plugin testing docs (#31)
* docs: improve plugin testing docs * Automatic update on Toolbelt plugin documentation
1 parent 89289c0 commit 38a9a44

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,19 @@ Also, if necessary, feel free to create libraries, clients, and [modules](https:
6262
6363
### Step 3: Testing your plugin
6464

65+
#### Testing your plugin alone
66+
At project root, run: `./bin/run`
67+
68+
#### Linking and testing with Toolbelt
69+
70+
Before the steps to link, you need to ensure that your plugin already is in the two places on the Toolbelt package.json: The "dependencies" and "plugins". If aren't, run:
71+
72+
`yarn add ./{path-do-plugin}/cli-plugin-{name}`
73+
74+
And manually add your plugin to "plugins" at toolbelt/package.json.
75+
76+
Now, let's link:
77+
6578
1. Run `yarn link` in your plugin project.
6679
2. Now, in the **cloned** Toolbelt directory, run `yarn link @vtex/cli-plugin-{name}`.
6780
3. Run `yarn watch` in both the cloned `vtex/toolbelt` and in the `plugin repo`.
@@ -113,7 +126,7 @@ $ npm install -g @vtex/cli-plugin-template
113126
$ vtex COMMAND
114127
running command...
115128
$ vtex (-v|--version|version)
116-
@vtex/cli-plugin-template/0.0.0 linux-x64 node-v12.21.0
129+
@vtex/cli-plugin-template/0.0.0 linux-x64 node-v12.22.7
117130
$ vtex --help [COMMAND]
118131
USAGE
119132
$ vtex COMMAND

0 commit comments

Comments
 (0)