A roguelike.
You will need functioning installations of:
Libraries and packages are managed by:
The JavaScript is written in ES6 and JSX, using ES6 modules.
The CSS is written using Less.
/
bin/ # Scripts, mostly for convenience
lib/ # Third party libraries
out/ # Compiled output
src/ # Application source
assets/ # Images, fonts, etc.
The build system is powered by NPM. To get a list of available tasks run:
npm run
- JavaScript
- Browserify is used to traverse the dependency tree, compile the source to browser-compatible ES5, and concatenate the output.
- Babel is used by Browserfiy to compile ES6/7 and JSX to ES5, and is invoked through babelify.
- CSS
- Search paths
node_modules
,lib
, andsrc
are searched when resolving imports in JS and CSS (see package.json'sconfig
hash)
- Source maps
less
andbrowserify
are both configured to output source maps, including the complete original source, in their compiled output. You shouldn't need any additional setup in your browser to use them.
In development you really only need to use
npm run serve
It will build and watch the source and serve it locally.
bin/
exec
- A shortcut for executing locally installed Node modules'bin
scripts- Before:
./node_modules/.bin/less
- After:
./bin/exec less
- Before:
run
- A shortcut fornpm run
that lets you run multiple scripts more easily- Before:
npm run clean && npm run build-js && npm run build-css && npm run build-html
- After:
./bin run clean build-js build-css build-html
- Options:
-s
- if the first argument is-s
it will be passed asnpm run -s
- Before:
run-parallel
- A wrapper forbin/run
that runs tasks in parallel using parallelshell- Before:
parallelshell 'npm run build-js' 'npm run build-css' 'npm run build-html'
- After:
./bin/run-parallel build-js build-css build-html
- Options:
-s
- if the first argument is-s
it will be passed asnpm run -s
- Before:
- To enable, add the project directory to your workspace by right-clicking in the sources tab's navigation pane and choosing "Add Folder to Workspace"
- Then set up mappings between your network resources and local filesystem (see Chrome's documentation for details)