-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate modules #53
base: master
Are you sure you want to change the base?
Separate modules #53
Conversation
One thing to consider would be versioning. The options I see are:
I guess option 1 would be ideal, but is it realistic? |
Another thing I’ve been thinking about recently: npm installs a package named There’s one advantage. Someone switching to depend on So you could easily switch from prototype to production: $ npm install --save trine
# Work your wonders, helping yourself from any `trine/…` function.
# After some time the thing is ready.
$ npm rm --save trine; npm install --save trine/boolean/and trine/number/add
$ npm publish I don’t know how npm would react to things like |
Ideally (considering a balance between maintainability and avoiding duping) I think we should do the same as lodash, i.e. everything is released together, but cross-dependencies are semver-tagged to latest major release (e.g. `"lodash.pick": "^3.0.0"). However, I'm not sure what to do while we're still at 0.x.x release. But #19 aside, things are starting to stabilize and be relatively consistent, and because most modules really only do one thing and have no overloads, over time most modules will most likely even freeze (refactoring / perf improvements / documentation / bugfix changes aside), so I think most changes will be adding new features. That means we could probably soon bump to 1.0.0, and will likely stay there for a long time (at least until the bind operator proposal is dropped and we have to come up with a new API, heh) and adopt the lodash approach.
Interesting idea. Unfortunately npm requires namespaces to start with npm install trine
node -e 'require("trine/boolean/and")' # loads `node_modules/trine/boolean/and.js`
npm install trine/boolean/and # we're installing this inside the trine package, `node_modules/trine/boolean/and/`
node -e 'require("trine/boolean/and")' # loads `node_modules/trine/boolean/and.js` because `.js` is prioritized over `/index{ext}` |
True. I thought I had read it somewhere on https://github.com/npm/npm/issues, that npm really doesn’t care what characters there are in a name – and But that must have been a false memory :) In fact
I’m no heavy user of lodash – and their repo doesn’t tell me much – but what they do seems to be somewhere between my two propositions. Do I get it right?
I hope so :) But in case a breaking change in And I don’t see anything wrong with this too: {
"name": "trine",
"version": "12.4.1",
"dependencies": {
"trine.boolean.and": "^2.3.2",
"trine.number.add": "^1.2.5",
…
},
…
} |
Yes, i.e. for every new release, everything gets bumped regardless of whether it's changed, yet the dependency tags stay the same. However, lodash doesn't have any external dependencies, whereas Trine does ( |
Yeah, good point. |
Fixes #47.