Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1.15 KB

README.md

File metadata and controls

27 lines (15 loc) · 1.15 KB

Asteroids

An implementation of the classic Asteroids game in HTML5. A live version of the game can be found here: www.ryanpaulwilliams.com/asteroids

Bundling

The source code in the src directory is bundled into a single file using Browserify. The Browserify tools must first be installed on your system:

$ npm install -g browserify (for OSX and linus users, you may need to preface this command with sudo)

Once installed, you can bundle the current source with the command:

$ browserify src/app.js -o bundle.js

Remember, the browser must be refreshed to receive the changed javascript file.

Watching

You may prefer to instead watch the files for changes using Watchify. This works very similarily to Browserify. It first must be installed:

$ npm install -g watchify (again, sudo may need to be used on linux and OSX platforms)

Then run the command:

watchify src/app.js -o bundle.js

The bundle will automatically be re-created every time you change a source file. However, you still need to refresh your browser for the changed bundle to take effect.