added built assets

Nathan DECHER 5 years ago
parent 3e8eb69329
commit 142024a315
  1. 3
      .gitignore
  2. 2
      Makefile
  3. 14
      install.js
  4. 2
      package.json
  5. BIN
      public/assets/apple32.png
  6. 1
      public/assets/config.json
  7. BIN
      public/assets/door32.png
  8. BIN
      public/assets/fire-anim.png
  9. BIN
      public/assets/hole-ts.png
  10. BIN
      public/assets/icon256.png
  11. BIN
      public/assets/icon32.png
  12. BIN
      public/assets/key32.png
  13. 1
      public/assets/levelList.json
  14. 1
      public/assets/metaConfig.json
  15. BIN
      public/assets/oil32.png
  16. BIN
      public/assets/peach-decay-anim.png
  17. BIN
      public/assets/peach-rainbow-anim.png
  18. BIN
      public/assets/portal-a-anim.png
  19. BIN
      public/assets/portal-b-anim.png
  20. BIN
      public/assets/portal-c-anim.png
  21. BIN
      public/assets/portal-d-anim.png
  22. 1
      public/assets/snake.json
  23. BIN
      public/assets/spikes-ts.png
  24. BIN
      public/assets/switch-ts.png
  25. BIN
      public/assets/wall32.png
  26. BIN
      public/favicon.ico

3
.gitignore vendored

@ -1,9 +1,6 @@
node_modules/
public/assets/*.png
public/assets/*.json
public/css/*.css
public/js/*.js
public/favicon.ico
build/*.png
db.sqlite

@ -82,7 +82,7 @@ public/assets/portal-d-anim.png: public/assets/portal-a-anim.png
convert $^ -modulate 100,100,50 $@
public/assets/%.json: assets/%.json
cp $^ $@
ln -s ../../$^ $@
public/css/snek.css: src/less/snek.less $(wildcard src/less/*.less)
node_modules/.bin/lessc $< $@

@ -1,5 +1,19 @@
const DB=require('better-sqlite3');
const fs=require('fs');
const child_process=require('child_process');
// prepare database
console.log('Preparing database');
fs.unlinkSync('db.sqlite');
const db=new DB('db.sqlite');
db.exec(fs.readFileSync('init.sql', 'utf8'));
// compile less
console.log('Compiling less');
child_process.execFileSync('node_modules/.bin/lessc', ['src/less/snek.less', 'public/css/snek.css']);
// merge js
console.log('Merging js');
const jsFiles=fs.readdirSync('src/js').map(f => 'src/js/'+f);
const merged=child_process.execFileSync('node', ['mergejs.js', ...jsFiles]);
fs.writeFileSync('public/js/snek.js', merged);

@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"start": "node index.js",
"prepare": "rm -f db.sqlite && make clean all && node install.js"
"prepare": "node install.js"
},
"repository": {
"type": "git",

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

@ -0,0 +1 @@
../../assets/config.json

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

@ -0,0 +1 @@
../../assets/levelList.json

@ -0,0 +1 @@
../../assets/metaConfig.json

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

@ -0,0 +1 @@
../../assets/snake.json

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Loading…
Cancel
Save