Skip to content

Commit 30519c4

Browse files
authored
Merge pull request rails#43745 from gmcgibbon/yarn_link_contributing_guide
Mention yarn linking in contributing guide to run local npm packages
2 parents 6f2c402 + a981911 commit 30519c4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

guides/source/contributing_to_ruby_on_rails.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,15 @@ $ bundle exec rails new ~/my-test-app --dev
236236
The application generated in `~/my-test-app` runs against your local branch
237237
and, in particular, sees any modifications upon server reboot.
238238

239+
For JavaScript packages, you can use [`yarn link`](https://yarnpkg.com/cli/link) to source your local branch in a generated application:
240+
241+
```bash
242+
$ cd rails/activestorage
243+
$ yarn link
244+
$ cd ~/my-test-app
245+
$ yarn link "@rails/activestorage"
246+
```
247+
239248
### Write Your Code
240249

241250
Now get busy and add/edit code. You're on your branch now, so you can write whatever you want (make sure you're on the right branch with `git branch -a`). But if you're planning to submit your change back for inclusion in Rails, keep a few things in mind:

0 commit comments

Comments
 (0)