Sha256: a561c877232189f9ee7df8799c157f223b3b89899f3abe34ae88835b03bcd9ea

Contents?: true

Size: 1.18 KB

Versions: 22

Compression:

Stored size: 1.18 KB

Contents

# Developing Webpacker

It's a little trickier for Rails developers to work on the JS code of a project like shakacode/shakapacker. So here are some tips!

## Use some test app
For example, for React on Rails Changes, I'm using [shakacode/react_on_rails_tutorial_with_ssr_and_hmr_fast_refresh](https://github.com/shakacode/react_on_rails_tutorial_with_ssr_and_hmr_fast_refresh).
This directory is the `TEST_APP_DIR`.

## Fork shakacode/shakapacker
Let's call the shakacode/shakapacker directory `WEBPACKER_DIR` which has shakacode/shakapacker's `package.json`.

## Changing the Package
### Setup with Yalc
Use [`yalc`](https://github.com/wclr/yalc) unless you like yak shaving weird errors.
1. In `WEBPACKER_DIR`, run `yalc publish`
2. In `TEST_APP_DIR`, run `yalc link shakapacker`

## Update the Package Code
1. Make some JS change in WEBPACKER_DIR
2. Run `yalc push` and your changes will be pushed to your `TEST_APP_DIR`'s node_modules.
3. You may need to run `yarn` in `TEST_APP_DIR` if you added or removed dependencies of shakacode/shakapacker.

## Updating the Ruby Code

For the Ruby part, just change the gem reference `TEST_APP_DIR`, like:

```ruby
gem "webpacker", path: "../../forks/webpacker"
```

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
shakapacker-6.6.0 docs/developing_webpacker.md
shakapacker-6.5.6 docs/developing_webpacker.md
shakapacker-6.5.5 docs/developing_webpacker.md
shakapacker-6.5.4 docs/developing_webpacker.md
shakapacker-6.5.3 docs/developing_webpacker.md
shakapacker-6.5.2 docs/developing_webpacker.md
shakapacker-6.5.1 docs/developing_webpacker.md
shakapacker-6.5.0 docs/developing_webpacker.md
shakapacker-6.4.1 docs/developing_webpacker.md
shakapacker-6.4.0 docs/developing_webpacker.md
shakapacker-6.3.0 docs/developing_webpacker.md
shakapacker-6.3.0.pre.rc.1 docs/developing_webpacker.md
shakapacker-6.2.1 docs/developing_webpacker.md
shakapacker-6.2.0 docs/developing_webpacker.md
shakapacker-6.1.1 docs/developing_webpacker.md
shakapacker-6.1.0 docs/developing_webpacker.md
shakapacker-6.1.0.beta.0 docs/developing_webpacker.md
shakapacker-6.0.2 docs/developing_webpacker.md
shakapacker-6.0.1 docs/developing_webpacker.md
shakapacker-6.0.0 docs/developing_webpacker.md