- Installation
- Deployment
- [Improvements] (#improvements)
$ npm install
$ npm start
instructions for hipotetical deployment
enable the noConflictMode in config.js file (if its disabled, global init functions are not exposed)
noConflictMode: true,
if you want to change, where you deploy your images you can modify those entries, in config.js
//path to assets with showdown app images
assetsPathShowdown : '/assets/images/showdown/',
//path to assets with wheel app images
assetsPathWheel : '/assets/images/wheel/',
$ npm install
$ npm run build
deploy your application to a server include the main.js file from dist in your html, and call
window.wheelInit();
window.showdownInit();
if those global names collide, with your current code, you can change init functions name in config.
//function name exposed to window to initialise wheel app
//change in case its colliding in your system
wheelInitFunction: 'wheelInit',
//function name exposed to window to initialise showdown app
//change in case its colliding in your system
showdownInitFunction: 'showdownInit',
import src/showdown/index.js
and src/wheel/index.js
they both expose init functions
Possible improvments i could implement
- Add preloading of assets
- Dont't use PIXI, as i discovered during development of this project PIXI modifies prototypes of native javascript, and that could be a problem in some client applications
- Better organize config.js
- Add optimizer in webpack for images, they are really big