ramiel / router.js

Router.js is a simple and powerful javascript library to handle routing
116 stars 21 forks source link

add property "main" to package.json #8

Closed rockymanobi closed 9 years ago

rockymanobi commented 9 years ago

Hi ramiel.

Thanks for great library.

I tried to use route.js with browserify but it fails when compiling. I found that package.json does not have main property , so i added and it worked.

thanks.

FYI

// code I tried
var Router = require("router.js"); 

and i got error messages below.

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Cannot find module 'router.js' from '/Users/rocky/nextremer/piculetly/vendor'
    at /Users/rocky/nextremer/piculetly/node_modules/browserify/node_modules/resolve/lib/async.js:46:17
    at process (/Users/rocky/nextremer/piculetly/node_modules/browserify/node_modules/resolve/lib/async.js:173:43)
    at ondir (/Users/rocky/nextremer/piculetly/node_modules/browserify/node_modules/resolve/lib/async.js:188:17)
    at load (/Users/rocky/nextremer/piculetly/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
    at onex (/Users/rocky/nextremer/piculetly/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
    at /Users/rocky/nextremer/piculetly/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
    at Object.oncomplete (fs.js:107:15)
ramiel commented 9 years ago

I was planning to change the name for npm module (routerjs?). Having it to finish in ".js" can lead to confusion when using commonJS modules. Anyway thank you for the PR I will integrate it. Can you just point it to develop instead of master?

rockymanobi commented 9 years ago

Can you just point it to develop instead of master?

Sure. Ill close this PR and send a new one todevelop`.

I was planning to change the name for npm module (routerjs?). Having it to finish in ".js" can lead to confusion when using commonJS modules.

I agree. routerjs sounds better.