Skip to content

Commit

Permalink
collapsible readme
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikPeters committed Feb 20, 2024
1 parent 235d431 commit 91328e4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ async function main() {
main();
```

Setup in the browser for high-js:
<details>
<summary>Setup in the browser for high-js</summary>
```html
<script src="https://cdn.jsdelivr.net/npm/lp-model@latest/dist/lp-model.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/highs/build/highs.js"></script>
Expand All @@ -60,8 +61,11 @@ Setup in the browser for high-js:
main();
</script>
```
</details>

Setup in the browser for glpk.js, in a module:
<details>
<summary>Setup in the browser for glpk.js</summary>
glpk.js needs to be loaded as a module, so you need to use the `type="module"` attribute on the `script` tag.
```html
<script type="module">
import { Model } from "https://cdn.jsdelivr.net/npm/lp-model@latest/dist/lp-model.es.min.js";
Expand All @@ -76,6 +80,7 @@ Setup in the browser for glpk.js, in a module:
main();
</script>
```
</details>

### Example model

Expand Down

0 comments on commit 91328e4

Please sign in to comment.