-
Notifications
You must be signed in to change notification settings - Fork 0
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
REMOVE SPROCKETS + SUPPORT VITE #98
Conversation
- move assets to src folder and package it as @digitalnz/plug and publish it to com - update installer to include required js files - import trix and milligram as node package - drop support to sprockets and introduce vite support
copy_file 'plug.vite.js', 'app/frontend/entrypoints/plug.js' | ||
end | ||
|
||
def add_plug_package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds a package called @digitalnz/plug
to the host app during the installation via rails g plug:install
command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@import 'trix/dist/trix'; | ||
@import 'trix-overrides'; | ||
|
||
@import 'milligram'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Milligram
and Trix
are imported via npm package now instead of the minified version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's much better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@import 'trix/dist/trix'; | ||
@import 'trix-overrides'; | ||
|
||
@import 'milligram'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's much better!
super nit: Do you think you could change the title of this MR to mention that it's for Plug? I feel like we might have trouble finding this MR down the line without it :) otherwise it looks really good. Nice! |
Changes:
plug.js
entrypoint and addPlug
package.Plug
assets into a npm package.