Skip to content

Commit

Permalink
release correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Eccenux committed Dec 19, 2023
1 parent 010e643 commit 7c734e7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.building your project.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,22 +369,22 @@ In your main deployment script you could have something like (`wikiploy.mjs`):
```
The script doesn't have any limits. However, you do need interface-admin rights to deploy to the `MediaWiki:Gadget-` namespace. So, you might need to use `~/` to deploy to your user-space.

### Deploying in your user space
### Release version in your user space

**If you do *not* have interface-admin rights**, the functions could look like this:

```js
export function addConfig(configs, site, isRelease) {
let deploymentName = isRelease ? '~/yourGadgetName.js' ? '~/yourGadgetName-dev.js';
let deploymentName = isRelease ? '~/yourGadgetName' : '~/yourGadgetName-dev';
configs.push(new DeployConfig({
src: 'dist/yourGadgetName.js',
dst: '~/yourGadgetName.js',
dst: `${deploymentName}.js`,
site,
nowiki: true,
}));
configs.push(new DeployConfig({
src: 'dist/yourGadgetName.css',
dst: '~/yourGadgetName.css',
dst: `${deploymentName}.css`,
site,
}));
}
Expand All @@ -393,7 +393,7 @@ export function addConfigRelease(configs, site) {
}
```

In this case, you have both dev and release versions in your user space. Frankly, this might be the best choice, even if you have admin rights.
In this case, you have both dev and release versions in your user space. Frankly, this might be the best choice, even if you have admin rights, especially if you use the *loader pattern*.

### Loader pattern for gadgets

Expand Down

0 comments on commit 7c734e7

Please sign in to comment.