Skip to content

node patterns #2

Description

@isaacs
  1. There should be a package.json file so that it can be published and installed via npm.
  2. The dependencies should be loaded as dependencies in the node_modules folder in the node case, and listed in the package.json file. (npm install can pick them all up.)
  3. Don't modify require.paths, which is deprecated as of node 0.3, and completely gone in 0.5.
  4. Prefer using exports rather than globals.
  5. It's be nice to have a node client as well as a server, perhaps even more valuable. (In particular, it'd be really nice to use this in npm for a few things, where I'm instead shelling out to the command line git program.)

It may be worthwhile to check out requirejs or browserify to be able to use exactly the same patterns in both the browser and Node.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions