Closed taye closed 5 years ago
What's the reasoning behind browserify and rollup being dependencies? They should not be in the final distributable build, but only used for the build process itself
Having the build tools listed as dependencies ensures that npm makes them available for vrview's build process as it's installed as a dependency. Otherwise, a dependent package would need to list the same build tools as dependencies to install vrview and successfully run the postinstall script.
If you're pulling down vrview as a dependency, it should not pull down browserify/rollup to be included in a consumer's bundle. The build process in this project needs some work to support npm importing, but requiring consumers to build the project isn't the way to do it, I think. Ideally it'd reference a prebuilt distributable. Are there other popular projects putting build dependencies in dependencies
and requiring consumers to build a JS lib on npm? I know native modules perform something like this, but they don't have the dependency vs devDependency issue. Curious to learn more
If you're pulling down vrview as a dependency, it should not pull down browserify/rollup to be included in a consumer's bundle. The build process in this project needs some work to support npm importing, but requiring consumers to build the project isn't the way to do it, I think.
From the info in the readme and the fact that the project doesn't seem to be published to npm, I got the impression that having prebuilt files in the package wasn't preferred.
Ideally it'd reference a prebuilt distributable.
I'd like this. I think that publishing the build artefacts to npm and/or committing them to a tagged release branch would be a nice way to do this.
Are there other popular projects putting build dependencies in dependencies and requiring consumers to build a JS lib on npm? I know native modules perform something like this, but they don't have the dependency vs devDependency issue. Curious to learn more
I don't remember coming across any non native packages that do this. Committing build output is quite common though.
@taye we're having a chat on our end next week to see how we can make the build/setup/install experience nicer, with fully supporting npm usage, and bringing this up to speed. Will have more to update then; thanks!
This PR
npm build
script fromdevDependencies
todependencies
postinstall
script which runsnpm build
require
call which incorrectly assumed the location of of thestats-js
module (#159)so that developers can