Skip to content

Commit

Permalink
MDN canvas tutorial in Reason and Webpack (#35)
Browse files Browse the repository at this point in the history
* .gitignore: add emacs *~ files

* Adds a basic canvas with ball bouncing off walls

* MDN tutorial rewritten with webpack-reason-loader

* Temporarily add melange runtime libs

* CI: copy melange runtime lib to node_modules

* Add merlin and dot-merlin-reader

* Ignore .merlin files from VCS

* Split hello.re into two Reason files
  • Loading branch information
ManasJayanth committed May 19, 2024
1 parent 94da178 commit b295f1e
Show file tree
Hide file tree
Showing 272 changed files with 63,259 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:

- name: Install dependencies
run: npm ci

- name: Copy melange runtime libs
run: cp -R melange-node-modules/* ./node_modules/

- name: Build website
run: npm run build

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:

- name: Install dependencies
run: npm ci

- name: Copy melange runtime libs
run: cp -R melange-node-modules/* ./node_modules/

- name: Test build website
run: npm run build

Expand Down
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dependencies
/node_modules
node_modules

# Production
/build
Expand All @@ -20,4 +20,13 @@ yarn-debug.log*
yarn-error.log*

# Emacs
*~
*~

# esy
_esy

# webpack-reason-loader
.cache

# Merlin
.merlin
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ We were joined by organisers of two other communities, [Anupam](https://function

## Next meetup: May 26th, 2pm.

We learn how Melange compiler works with a build system to generate JS artifacts. We see how [webpack-reason-loader](https://github.com/DiningPhilosophersCo/reason-loader) was built and try to integrate it with this website [here](/mdn-canvas-tutorial)
We learn how Melange compiler works with a build system to generate JS artifacts. We see how [webpack-reason-loader](https://github.com/DiningPhilosophersCo/reason-loader) was built and try to integrate it with this website [here](/mdn-game-tutorial)
You can find the code repository on [Github org](https://github.com/ReasonIndia/reason-bangalore.github.io). You
can reach out me on X at [@ManasJayanth](https://x.com/ManasJayanth) if you have any trouble. I recommend you set it up and install the dependencies to save time during the call :)

Expand Down
2 changes: 2 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ const config = {
darkTheme: prismThemes.dracula,
},
}),

plugins: ["./plugins/docusaurus-webpack-plugin"],
};

export default config;
15 changes: 15 additions & 0 deletions esy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"dependencies": {
"ocaml": "5.x",
"@opam/dune": "*",
"@opam/melange": "*",
"@opam/reason": "*"
},
"devDependencies": {
"@opam/merlin": "*",
"@opam/dot-merlin-reader": "*",
"@opam/ocamlformat": "*",
"@opam/ocamlformat-rpc": "*",
"@opam/ocaml-lsp-server": "*"
}
}
3 changes: 3 additions & 0 deletions esy.lock/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions esy.lock/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b295f1e

Please sign in to comment.