Skip to content
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

React dependency #3

Open
pgherveou opened this issue Nov 19, 2013 · 2 comments
Open

React dependency #3

pgherveou opened this issue Nov 19, 2013 · 2 comments

Comments

@pgherveou
Copy link

Hi Pete. Cool package!
Shouldn't we use a peer dependency for react-tools in this package ?
or maybe use "react-tools": "0.x" notation to make it more flexible

@petehunt
Copy link
Owner

Why peer dependency? It's already in dependencies (I'm not the best with npm I'm afraid)

@pgherveou
Copy link
Author

Well I might be wrong,
But my understanding is that node-jsx in meant to be used with a host React app

So you don't want this package to install its own "react-tools" dependency when
you install it with npm install but rather use the one you have already declared in your project.
(this is the case today if I use react tools 0.5)

I read that pretty quickly :) but the details are here http://blog.nodejs.org/2013/02/07/peer-dependencies/

So basically I would write package.json like that:

{
  "name": "node-jsx",
  "version": "0.0.0",
  "description": "transparently require() jsx from node",
  "main": "index.js",
  "peerDependencies": {
    "react-tools": "0.x"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": "",
  "author": "Pete Hunt",
  "license": "Apache 2"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants