Skip to content

Commit 27d7e93

Browse files
authored
Fix documentation of new.js usage (#25)
Expanded README.md instructions on how to add a new extension
2 parents 2279be6 + 00cd13c commit 27d7e93

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ This contains a registry of extensions.
1212

1313
1. Fork this repository
1414
2. Add a new folder in the `registry` folder with the name `<vendorid>.<pluginid>`
15-
3. Add your extension to the registry using `node scripts/new.js registry/<vendorid>.<pluginid> <path/to/your/extension.json>`. This will create a new folder with the name `<vendorid>.<pluginid>` and create the `extension.json` based on your extension in it. (You can also specify your lua entry script path instead)
16-
4. Run `npm run all` to validate your changes
17-
5. Run `git add .` and `git commit -m "Added <your-plugin-id>"`
18-
6. Push your changes to your fork
19-
7. Create a pull request to this repository
20-
8. Wait for approval
15+
3. Find the metadata `Extension.json` that was generated from your `Extension.json.in` file from within your Extensions build folder. For Lua plugins you can use the main plugin lua file instead.
16+
4. Add your extension to the registry using `node scripts/new.js registry/<vendorid>.<pluginid>/extension.json <buildfolder/Extension.json>`. This will create a new folder with the name `<vendorid>.<pluginid>` and create the `extension.json` based on your extension in it.
17+
(You can also specify your lua entry script path instead)
18+
5. Fill in the `sources` array in the newly created `extension.json` file with the urls to your Extension.
19+
6. Run `git add .` and `git commit -m "Added <your-plugin-id>"`
20+
7. Push your changes to your fork
21+
8. Create a pull request to this repository
22+
9. Wait for approval
2123

2224
## Fixing / setting SHA keys
2325

scripts/new.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ async function parseSpec(pathToSpec) {
4242

4343
async function main(argv) {
4444
if (argv.length < 4) {
45-
console.error('Usage: node scripts/newversion.js <extension.json> <plugins.json/plugin.lua>');
45+
console.error('Usage: node scripts/new.js <vendor.company/extension.json> <plugin.json/plugin.lua>');
46+
console.error('Example: node scripts/new.js company.myplugin/extension.json ~/builds/myplugin/myplugin.json');
4647
return 1;
4748
}
4849

0 commit comments

Comments
 (0)