Can't append to inexistant file
florentferry opened this issue · comments
Running generator fails due to inexistant file (append frontend/components/index.js
).
We need to provide some extra informations in readme.
mv app/javascript ./frontend
mkdir frontend/components
touch frontend/components/index.js
# frontend/packs/application.js
import '../components/index'
What about a rake test / generator to run after installing the gem?
rails g komponent:install
It would take care of these actions.
Seems good to have a script to do that kind of things. We need to modify config/webpacker.yml
in it too.
How we can deal with webpacker
dependency, as we need config/webpacker.yml
and app/javascript
structure ? Maybe a warning when running rails g komponent:install
?
Yeah, we can check if config/webpacker.yml
and app/javascript
exist, and if not, raise an error, explaining that webpacker
needs to be installed?