Hacker News new | ask | show | jobs
by fruchtose 4230 days ago
Just a note: the NPM manifest declares the entry point as "index.js", but this file does not exist.
1 comments

Hey, thanks. Yah I kind've knew about this, and never got back to it. What do you think I should put in index.js?

I was thinking `throw new Error('You're doing it wrong');` :-P

In that case, it makes more sense to publish each submodule as an individual NPM module.
Further, it's worth putting the components on npm individually and retaining 101, but making it depend on those modules (so it's really just a wrapper). This is what lodash should do imo. Lodash has the separate bits on npm, but lodash itself does not depend on them, which is a little weird.
I like this idea - just would be really annoying to maintain each module as a versioned dependency...
I definitely did that for a while, but eventually found it annoying. I know it's definitely better to package each of these as a separate module. But uses of each of the tiny modules like these can come and go very quickly and keeping the package.json up to date becomes tedious..
That's where a build system comes into place. I noticed you don't seem to be using Grunt or Gulp which could really cut down on the maintenance.
You could stick it in /dist/index.js.

You could also make /dist/index.min.js.