The following changes are made to the original code:
- removed the code related to the DOM document manipulation and html code.
- Avoid usage of global variables originally defined in settings.js and keeping them inside the FactorySpec object.
- refactored item class to keep the recipes and uses names instead of objects, avoiding the graph structure and making it serializable.
- Packaged and published npm package.
Usage of the package
In order to add the library in your npm project simply type:
npm install --save @kgrech/factorio-calculator-core
Please see example of minimal usage of the package in the example subfolder.
npmjs.com package page
See @kgrech/factorio-calculator-core package page.