Add a simple system for building with HTML
This commit is contained in:
parent
a0a38a91bd
commit
524ba41ef5
10
Makefile
Normal file
10
Makefile
Normal file
|
@ -0,0 +1,10 @@
|
|||
all: out/gender.min.js out/index.html
|
||||
|
||||
out/gender.max.js: src/
|
||||
elm make src/Main.elm --optimize --output out/gender.max.js
|
||||
|
||||
out/gender.min.js: out/gender.max.js
|
||||
npx uglify-js out/gender.max.js --compress 'pure_funcs=[F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9],pure_getters,keep_fargs=false,unsafe_comps,unsafe' | npx uglify-js --mangle --output out/gender.min.js
|
||||
|
||||
out/index.html: static/index.html
|
||||
cp static/index.html out/index.html
|
9
README.md
Normal file
9
README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Gender Friends
|
||||
|
||||
A silly little meme sketch thingy idk
|
||||
|
||||
## Building
|
||||
|
||||
Install [`elm`][] and [`npx`][] (just used for minification).
|
||||
|
||||
Run `make` in the same directory as this README.
|
14
static/index.html
Normal file
14
static/index.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!Doctype HTML>
|
||||
<html>
|
||||
<head>
|
||||
<script src="gender.min.js"> </script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="elm-zone"></div>
|
||||
<script>
|
||||
Elm.Main.init({
|
||||
node: document.getElementById('elm-zone')
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue