Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update modularisation details in Installation docs #2620

Merged
merged 1 commit into from
Feb 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Installation

- [CDN](#cdn)
- [CDN and online playground](#cdn)
- [npm](#npm)
- [Quick start with Webpack](#quick-start-with-webpack)
- [TypeScript](#typescript)

### CDN
### CDN and online playground

If you're new to JavaScript or just want a very simple setup to get your feet wet, you can get Mithril from a [CDN](https://en.wikipedia.org/wiki/Content_delivery_network):

```html
<script src="https://unpkg.com/mithril/mithril.js"></script>
```

If you would like to try out mithril without setting up a local environment, you can easily use an online playground at [flems.io/mithril](https://flems.io/mithril).

---

### npm
Expand Down Expand Up @@ -94,7 +96,7 @@ Then, you could remove the import line from step 4 (don't forget to restart Webp

For production-level projects, the recommended way of installing Mithril is to use npm.

npm is the default package manager that is bundled w/ Node.js. It is widely used as the package manager for both client-side and server-side libraries in the JavaScript ecosystem. Download and install [Node](https://nodejs.org); npm is bundled with that and installed alongside it.
npm is the default package manager that is bundled with Node.js. It is widely used as the package manager for both client-side and server-side libraries in the JavaScript ecosystem. Download and install [Node](https://nodejs.org); npm is bundled with that and installed alongside it.

To use Mithril via npm, go to your project folder, and run `npm init --yes` from the command line. This will create a file called `package.json`.

Expand Down