Create a small build tool to use ES6

This commit is contained in:
Aaron Fischer 2015-08-24 15:40:02 +02:00
commit 115859a301
4 changed files with 44 additions and 0 deletions

24
Makefile Normal file
View file

@ -0,0 +1,24 @@
default: compile
compile:
traceur --script src/*.js --out out/js13kgames-2015.js
uglifyjs --compress --mangle -- out/js13kgames-2015.js > out/js13kgames-2015.min.js
rm out/js13kgames-2015.js
cp -f src/*.{html,css} out/
zip: compile
rm -f js13kgames2015-aaronfischer.zip
zip -9 -r js13kgames-2015-aaronfischer.zip out/*
stats: zip
ls -al js13kgames-2015-aaronfischer.zip
watch:
while true; do \
make stats; \
inotifywait -qre close_write src/.; \
done
clean:
rm -rf out/
rm js13kgames-2015-aaronfischer.zip

13
src/index.html Normal file
View file

@ -0,0 +1,13 @@
<html>
<head>
<meta charset="utf-8">
<title>js13kGames 2015 -- Aaron Fischer</title>
<script src="js13kgames-2015.js"></script>
</head>
<body>
<script>
bootstrap();
</script>
</body>
</html>

3
src/main.js Normal file
View file

@ -0,0 +1,3 @@
var bootstrap = function() {
console.log("Hi du");
};

4
src/styles.css Normal file
View file

@ -0,0 +1,4 @@
* {
margin: 0;
padding: 0;
}