-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Update npm build to put stuff in react-router/lib
#154
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
Comments
Might be reasonable to just drop the |
I would love |
You don't have to publish from the project root, right? React has several npm packages corresponding to different directories in the source tree. |
but if you want to use what's on master with |
@mjackson this is my preference, and is how the repository was set up originally :P |
ooh, I think I have a great idea ... Any modules in the root of the project are "public", anything in But the source code still lives in // react-router/Link.js
module.exports = require('./modules/components/Link'); This way
|
@spicyj 👍 |
@rpflorence That sounds like a good plan. I'm 👍 |
this is why npm doesn't provide some "modules" config directory. everybody knows what is going on with a package, its just the file system, the end. /me goes back to figuring out why his ruby module isn't loading in rails |
this puts all public modules in the root of the package to: - conveniently require them - easily identify what is public v. private for example: ```js // instead of doing this var Router = require('react-router'); var Link = Router.Link; // or this var Link = require('react-router/modules/Link'); // you can now do this var Link = require('react-router/Link'); ``` closes #154
closing, follow #156 |
this puts all public modules in the root of the package to: - conveniently require them - easily identify what is public v. private for example: ```js // instead of doing this var Router = require('react-router'); var Link = Router.Link; // or this var Link = require('react-router/modules/Link'); // you can now do this var Link = require('react-router/Link'); ``` closes remix-run#154
I'm a big fan of the way the React project puts all their stuff in
react/lib
in the npm package. It makes it easy to use pieces of the project withoutrequire
ing the whole thing.e.g. instead of
I'd like to be able to do
Basically everything we now export in
main.js
should be available to require this way.The text was updated successfully, but these errors were encountered: