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

[RFR] Doc: how to use dev version in real world project? #19

Merged
merged 1 commit into from Sep 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Expand Up @@ -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
Copy link
Contributor

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.

Copy link
Member

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).


### 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`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a dash in npm-link ?

Copy link
Member

Choose a reason for hiding this comment

The 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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a typo.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unlink should be enough, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nah, let's keep rm

Copy link
Contributor

@greg0ire greg0ire Sep 7, 2016

Choose a reason for hiding this comment

The 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 rm though, indeed

npm install
```