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

Add namespaced packs feature to readme #235

Merged
merged 2 commits into from Apr 11, 2017
Merged

Add namespaced packs feature to readme #235

merged 2 commits into from Apr 11, 2017

Conversation

gauravtiwari
Copy link
Member

Related to #201

@gauravtiwari
Copy link
Member Author

@kuroda Is this looks fine to you - documentation for your PR?

README.md Outdated
```erb
<%# app/views/layouts/application.html.erb %>
<%= javascript_pack_tag 'admin/dashboard' %>
<%= stylesheet_pack_tag 'app/calendar' %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should simply put <%= javascript_pack_tag 'app/calendar' %> here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will fix 👍

@kuroda
Copy link
Contributor

kuroda commented Apr 10, 2017

@gauravtiwari

Well, it seems to be subtlely different from my intention.

I want to emphasize that we can have multiple JavaScript entry points with the same name:

app/javascript/packs/admin/orders.js
app/javascript/packs/shop/orders.js

and reference them in your views like this:

<%# app/views/admin/orders/index.html.erb %>
<%= javascript_pack_tag 'admin/orders' %>

and

<%# app/views/shop/orders/index.html.erb %>
<%= javascript_pack_tag 'shop/orders' %>

@gauravtiwari
Copy link
Member Author

@kuroda got it 👍 thanks

@gauravtiwari
Copy link
Member Author

@kuroda Updated the content. Reads fine to you?

@kuroda
Copy link
Contributor

kuroda commented Apr 11, 2017

@gauravtiwari It seems to be perfect.

@gauravtiwari gauravtiwari merged commit 0abb821 into rails:master Apr 11, 2017
@gauravtiwari gauravtiwari deleted the add-namespacing-feature-to-readme branch April 11, 2017 09:26
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

Successfully merging this pull request may close these issues.

None yet

2 participants