Build for development deployment - jackdarker/TwineTest GitHub Wiki
By default chapels tweego-setup build the project with uglify configured to "minify" the sources.
This makes debugging quite impossible since the code get converted to a cryptic shortened version.
For development I therefore recommend to set minify to false in ./src/config.json.
If you reactivate minification, your code might run into problems.
function/class-names will be replaced
storage.constructors[healthpotion.name] will not work anymore because healthpotion is renamed to something different.
Solution:
In ./gulpfile.js add the following into the () of uglify:
{mangle: { keep_fnames: true // keep function names
}}
Another option would be to generate a name-mapping (.map) but I'm not sure if you would still get issues when loading a game: the constructor to call is noted in the save-file and the mangled names might be different with each code-version.