Skip to content

Commit

Permalink
[dist] Version bump. 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Apr 25, 2011
1 parent 04910a4 commit 7b7c96b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "require-analyzer",
"description": "Determine dependencies for a given node.js file, directory tree, or module in code or on the command line",
"version": "0.1.2",
"version": "0.1.3",
"author": "Charlie Robbins <charlie.robbins@gmail.com>",
"repository": {
"type": "git",
"url": "http://github.com/nodejitsu/require-analyzer.git"
},
"dependencies": {
"findit": ">= 0.0.3",
"npm": ">= 0.3.14"
"npm": ">= 0.3.14",
"semver": ">= 1.0.4"
},
"main": "./lib/require-analyzer",
"bin": { "require-analyzer": "./bin/require-analyzer" },
Expand Down

5 comments on commit 7b7c96b

@marcuswestin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sweet dude. Did you check out https://github.com/marcuswestin/require?

@indexzero
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I did. Looks cool. I've been meaning to ask you the difference between that and node-browserify https://github.com/substack/node-browserify

@marcuswestin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah, a couple of differences.

browserify does add syntactic support for require() in the browser, but has these and other shortcomings notably for your development environment:

  • it recursively includes an entire directory without any dependency analysis;
  • since all these files are served as a single file, errors that are thrown will have incorrect file names and line numbers;
  • for the same reason it's much harder to debug your code - e.g. you can't find code and add breakpoints by filename;
  • adding a new file to the included directory requires restarting the server;
  • since browserify doesn't actually do dependency management, you have to register npm dependencies manually (see browserify's section on npm modules);
  • browserify does not help you distinguish between development and production;
  • it assumes that you are using connect.

require is built for a great development experience. Error reporting and debugging is as good as if you manually added a script tag for each required file. When you're done developing, there's good support for creating production builds. It's trivial to mount a require dev server onto you current node server, but you can also spin up a require dev server alongside any stack (e.g PHP/apache). Since dependencies are resolved and loaded at runtime using require.resolve, all you need to know is how node's module management and path resolution works.

In short, require makes no assumptions about your setup, works exactly like node's require does, and provides excellent compilation+minification for creating production builds.

@indexzero
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I will have to check it out. You still at Meebo?

@marcuswestin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope! I'm at Clover :)

Please sign in to comment.