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

Can I structure my files in the following way? #233

Closed
ankitrg opened this issue Apr 5, 2017 · 2 comments
Closed

Can I structure my files in the following way? #233

ankitrg opened this issue Apr 5, 2017 · 2 comments

Comments

@ankitrg
Copy link

ankitrg commented Apr 5, 2017

I very much like the Rails structure of having a folder with the controller name and then the views based on the action names.

I want to rename the packs to views which I can do, but I am not sure if this will be possible:

packs/posts/new.js
packs/posts/index.js
packs/blog/new.js

is doing something like this possible? Do you suggest some convention?


Edit

I think we can achieve this if this if the pack files generated are placed under their respective folders. Then we could do somthing like
<%= javascript_pack_tag 'posts/new' %>

@ytbryan
Copy link
Contributor

ytbryan commented Apr 6, 2017

Can I structure my files in the following way?

Yes. This is possible after #201

@gauravtiwari
Copy link
Member

gauravtiwari commented Apr 6, 2017

@ankitrg Please close this issue, this feature is in master now. You have to re-run bundle exec rails webpacker:install to replace your current shared.js

@ankitrg ankitrg closed this as completed Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants