Skip to content

Commit

Permalink
appendix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eccenux committed Dec 19, 2023
1 parent e558b2d commit da08f0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.building your project.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ import { addConfig, setupSummary } from './wikiploy-common.mjs';
});
```

## Release vs dev release
## Appendix: Release vs dev release

### Deploying as a gadget

Expand Down Expand Up @@ -425,7 +425,7 @@ The loader pattern is beneficial because it improves website performance. In thi

Loading from the `User` namespace might also help make it clear who is responsible for the gadget. However, it might not work when there is no single user responsible, such as when the main author becomes inactive. The community can always decide to fork the script, so that should not be a problem in practice.

## Exporting stuff
## Appendix: Exporting stuff

Note that *browserify* will wrap your code with a function automatically, so you don't have to worry about leaking variables to the global scope (you should still remember to define variables with `var`, `let`, or `const`).

Expand Down Expand Up @@ -476,7 +476,7 @@ mw.hook('userjs.yourGadgetName.ready').add(function (gadget) {
});
```

## Using classes
## Appendix: Using classes

JS has classes for a long time. They don't work in IE and you cannot use them in default gadgets on Wikipedia. If you are building a default gadget you might want to add [babeljs](https://babeljs.io/) as a build step.
```bash
Expand Down

0 comments on commit da08f0a

Please sign in to comment.