summaryrefslogtreecommitdiff
path: root/Justfile
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2024-10-31 19:47:41 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2024-10-31 19:47:41 +0000
commite91c7983cb07f1ae490c94ddef6c9fe6b7c6df90 (patch)
tree417801c4f1b2f5d0b6016b06c460f14c8eb8c6b8 /Justfile
parentdf192c6bfe28fd00132c23d89e4f03d64d78a6e7 (diff)
downloadthrow_simulation-e91c7983cb07f1ae490c94ddef6c9fe6b7c6df90.tar
throw_simulation-e91c7983cb07f1ae490c94ddef6c9fe6b7c6df90.tar.gz
throw_simulation-e91c7983cb07f1ae490c94ddef6c9fe6b7c6df90.zip
Improve build process
- add a "clean" target - install dependencies as part of the build process - swap out make for the simpler just (https://github.com/casey/just) - add http-server as a dev dependency
Diffstat (limited to 'Justfile')
-rw-r--r--Justfile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Justfile b/Justfile
new file mode 100644
index 0000000..db39c05
--- /dev/null
+++ b/Justfile
@@ -0,0 +1,17 @@
+build: get_dependencies
+ mkdir -p dist
+ cp src/index.html dist/index.html
+ cp src/index.js dist/index.js
+ cp node_modules/@dimforge/rapier2d-compat/rapier.es.js dist/rapier.es.js
+
+run: build
+ npx http-server dist/
+
+get_dependencies:
+ npm install --include=dev --fund=false
+
+format:
+ npx prettier . --write
+
+clean:
+ rm -rf dist node_modules