fiedl / webpacker-engine-test

1 stars 0 forks source link

Local dev setup: Use local package paths #7

Closed fiedl closed 4 years ago

fiedl commented 4 years ago

When developing my_engine (#1) or my_second_engine (#2), it's convenient to use the local source files rather than going through the package repository.

npm link might be used just as bundle config. https://docs.npmjs.com/cli/link.html

fiedl commented 4 years ago
[2020-01-26 16:59:36] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/my_engine master ⚡
▶ npm link

[2020-01-26 17:00:01] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/my_second_engine master ⚡
▶ npm link

[2020-01-26 17:00:26] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/main_app_with_webpacker master ⚡
▶ npm link my_engine
/Users/fiedl/rails/webpacker-engine-test/main_app_with_webpacker/node_modules/my_engine -> /usr/local/lib/node_modules/my_engine -> /Users/fiedl/rails/webpacker-engine-test/my_engine

[2020-01-26 17:00:30] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/main_app_with_webpacker master ⚡
▶ npm link my_second_engine
/Users/fiedl/rails/webpacker-engine-test/main_app_with_webpacker/node_modules/my_second_engine -> /usr/local/lib/node_modules/my_second_engine -> /Users/fiedl/rails/webpacker-engine-test/my_second_engine
fiedl commented 4 years ago

What to run while developing?

[2020-01-26 17:06:12] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/main_app_with_webpacker master ⚡
▶ bin/webpack --watch

[2020-01-26 17:03:00] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/main_app_with_webpacker master ⚡
▶ bin/rails server