-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Provide source files (allow npm install via git with a building step) #256
Conversation
Without this change, if you use npm to install the repo (or a fork 😉) you get a folder with just a package.json, which sucks. With this change, you get the source files too and allow to build yourself “dist” (using `cd node_modules/react-native-web && npm install`, build is in prepublish and prepublish is run in install with npm@2/3, with npm@4 you need to add `npm run build`)
Tests fails because of [email protected]. See #255. FYI, "npm run build" fail because of missing webpack.config.js, but at least you have the files transpiled. Alternatively, I guess we can consume the src files directly. |
Wouldn't this make the package size a lot larger? And couldn't people wanting to build from source just make use of the git repo? |
Obviously yes, but just .js files, so not that much imo.
It's not easy when you share your project with teammates (or I don't have an easy answer) |
Why do you need the source files? |
|
I don't understand why you're trying to build the package in your project. If you're trying to use a subset of the modules, you can import them directly from 'dist' into a local module and alias that to |
If you want to use a fork (eg react 15.4 partial support - I don't use touchable), the easiest way is to install from git. But when installing from git, .npmignore is considered so you end up with an empty folder. |
OK doesn't hurt to make that easier. Added in 945fff0 |
Without this change, if you use npm to install the repo (or a fork 😉) you get a folder with just a package.json, which sucks.
With this change, you get the source files too and allow to build yourself “dist” (using
cd node_modules/react-native-web && npm install
, build is in prepublish and prepublish is run in install with npm@2/3, with npm@4 you need to addnpm run build
)