ondras / rot.js

ROguelike Toolkit in JavaScript. Cool dungeon-related stuff, interactive manual, documentation, tests!
https://ondras.github.io/rot.js/hp/
BSD 3-Clause "New" or "Revised" License
2.32k stars 254 forks source link

Changes to Build Process and package.json #190

Closed shadowtime2000 closed 3 years ago

shadowtime2000 commented 3 years ago

Actions done:

  1. Added a file output to the rollup config
  2. Added minification output to the rollup config
  3. Added dist to .gitignore
  4. Added a build script and a prepublishOnly script
  5. Removed dist from source control
  6. Added browser field along with other fields for CDNs.
ondras commented 3 years ago

Hello, @shadowtime2000,

thanks for your will to contribute. It would be nice to explain what is the goal of your PR, i.e. what problems are you trying to solve. In particular:

  1. removing the dist/ folder breaks several parts of the app, namely the dist example, the interactive manual and the test runner.

  2. there already is a minification step present (google closure compiler)

  3. your rollup adjustment means that it is no longer possible to bundle without running the minification step

  4. I am not an npm expert, but I guess that the prepublishOnly script is used to generate the dist/ folder prior to publishing. All build-related steps are driven via the Makefile, so this script shall definitely call make (...) instead of rollup (...). I have no idea what the build npm script is good for.