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
[RFR] Doc: how to use dev version in real world project? #19
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,3 +130,25 @@ Check `sideEffect/saga.js` for a detail of the inputs and outputs | |
* Add unit tests | ||
* Add `<ReferenceMany>` field | ||
* Add complex field & input types | ||
|
||
## Contributing | ||
|
||
### Testing Your Changes on a Real Project | ||
|
||
In order to test your changes on a real world project, you can embed a work-in-progress version of the lib in another repository, using `npm-link`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why a dash in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's how it's described in https://docs.npmjs.com/cli/link There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It is for reffering to official documentation (thanks @fzaninotto :p). |
||
|
||
``` sh | ||
cd admin-on-rest | ||
git checkout my-current-development-branch | ||
npm link # allow this repo to be linked from another project | ||
|
||
cd ../real-world-project | ||
npm link admin-on-rest # replace admin-on-rest module by a symbolic link to dev version | ||
``` | ||
|
||
To use the real version again, just remove your symbolic link and reinstall dependencies: | ||
|
||
``` sh | ||
rm -Rf node_modules/admin-on-rest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nah, let's keep There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, but then why would you need to make it recursive? IMO this is not the command that would come to mind in association with "remove your symbolic link". Makes sense to stick with |
||
npm install | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about putting that in a
CONTRIBUTING.md
file? Github / Gitlab have special integration features for this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep that in the README for now,
Contributing.md
is more a guideline for pull requests. At that step, it's probable that contributors will have already tested their changes (I hope).