kiigame / adventure_engine

KiiGame Adventure Engine
BSD 3-Clause "New" or "Revised" License
1 stars 6 forks source link

Add bundling #133

Closed jnnl closed 5 years ago

jnnl commented 5 years ago

This PR adds module bundling using Rollup. It enables the engine to be used as a dependency in other projects and removes rest of the old-style script tag imports. Additional features can be easily added using Rollup plugins if needed. For example, the bundle size can be reduced using a minifier such as Terser.

Executing npm run build builds the library bundle to dist/ while npm run dev builds the development bundle to public/. Running Lätkäzombit from the project now requires executing the latter and accessing the files in public/ instead of the root directory.

These changes now make it possible to publish the project as a dependency as well!

evktalo commented 5 years ago

Thank you very much!