Skip to content

Commit

Permalink
build: Add roadroller and zip script
Browse files Browse the repository at this point in the history
  • Loading branch information
johnedvard committed Aug 19, 2022
1 parent 3d9b1c6 commit 4bd09be
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 22 deletions.
42 changes: 41 additions & 1 deletion package-lock.json

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

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"source": "src/index.html",
"scripts": {
"start": "parcel serve",
"build": "parcel build src/index.html"
"build": "rm -rf dist && parcel build src/index.html",
"zip": "cd dist && zip game.zip *.png *.html *.css *.js static/level/*.json",
"build:zip": "npm run build && cd dist && zip game.zip *.png *.html *.css *.js static/level/*.json",
"build:roadroller": "npm run build && roadroller dist/index.*.js -o dist/index.*.js && npm run zip"
},
"author": "johnedvard",
"license": "ISC",
Expand All @@ -14,7 +17,8 @@
"@parcel/compressor-gzip": "^2.7.0",
"@parcel/reporter-bundle-analyzer": "^2.7.0",
"parcel": "^2.7.0",
"parcel-reporter-static-files-copy": "^1.4.0"
"parcel-reporter-static-files-copy": "^1.4.0",
"roadroller": "^2.1.0"
},
"dependencies": {
"kontra": "^8.0.0"
Expand Down
17 changes: 0 additions & 17 deletions src/assetsUtils.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { Game } from './Game';
import { initAssets } from './assetsUtils';
import { NearConnection } from './near/nearConnection';
import { initLoginLogout } from './near/nearLogin';
const init = () => {
new Game();
initAssets();
initNear();
};

Expand Down

0 comments on commit 4bd09be

Please sign in to comment.