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

REMOVE SPROCKETS + SUPPORT VITE #98

Merged
merged 6 commits into from
Jul 25, 2024
Merged

REMOVE SPROCKETS + SUPPORT VITE #98

merged 6 commits into from
Jul 25, 2024

Conversation

hapiben
Copy link
Member

@hapiben hapiben commented Jul 24, 2024

Changes:

  • Removed the Sass gem that depends on Sprockets.
  • Used the Vite.js tag to include JS.
  • Updated the install generator to include plug.js entrypoint and add Plug package.
  • Packaged the old Plug assets into a npm package.
  • Removed/tidy ups CSS files.

hapiben added 6 commits July 24, 2024 10:20
- 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
Copy link
Member Author

@hapiben hapiben Jul 24, 2024

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.

Choose a reason for hiding this comment

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

Nice!

Comment on lines +2 to +5
@import 'trix/dist/trix';
@import 'trix-overrides';

@import 'milligram';
Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's much better!

Copy link
Contributor

@paul-mesnilgrente paul-mesnilgrente left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +2 to +5
@import 'trix/dist/trix';
@import 'trix-overrides';

@import 'milligram';
Copy link
Contributor

Choose a reason for hiding this comment

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

That's much better!

@chigginsboost
Copy link

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!

@hapiben hapiben merged commit f56d78a into main Jul 25, 2024
5 checks passed
@hapiben hapiben deleted the ba/vite-support branch July 25, 2024 01:35
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.

4 participants