visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

Clearer build process #510

Closed kaisermann closed 2 years ago

kaisermann commented 5 years ago

I was messing around a little bit with the source code and have noticed that the build step is not clear enough (many PRs have changes only in one of the possible entry files, etc).

Contributing: npm run build - to build the page.js and page.mjs; npm run watch - to build and also watch for file changes;

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-1.3%) to 92.437% when pulling 60f555ea9be4b55a60eac1dc66e51cdf4e5677f3 on kaisermann:clearer-build into 02c026ca82f9d3f5018038d822592e77c040cfb7 on visionmedia:master.

matthewp commented 5 years ago

Thank you for contributing! I think I'm ok with this change but would like to get #509 in and then circle back to this. I need to verify that it's safe to gitignore the built files, for example. I know that many people make the mistake of directly editing page.js. I don't think this necessary solves that issue though (maybe the prepublish script would cause their changes to be overridden and therefore signal that it's the wrong file).

kaisermann commented 5 years ago

Maybe putting them in a dist/ directory and point the package.json to them would help 🤔

kaisermann commented 5 years ago

@matthewp Just wondering if you'd like to revisit this :grin: