-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start bundling compiled assets in the Gem (#2397)
Taking inspiration from how Avo handles their gem assets, this bundles a compiled version of our assets inside the gem. We're using `jsbundling-rails` with `esbuild`, along with `cssbundling-rails` with `saas` to build Administrate's asset files, which is the closest of the newer approaches for handling assets in Rails as to what we'd been doing previously. We then remove `jquery-rails`, `sassc-rails` and `selectize-rails` gems which are replaced with the equivalents from `npm`. When releasing, we'll need to run `yarn run build` and `yarn run build:css` to compile the assets before building the gem which will now ship the contents of `app/assets/builds` with it. For someone using Administrate, they'll no longer need to compile the assets shipped by it as these will now be ready-to-use `.js` and `.css` files and any asset bundling approaches we choose (or need to, because they've changed upstream in Rails) should no longer have an impact on users of the gem. This is part of: #2311 https://avohq.io/blog/how-to-bundle-assets-in-a-rails-engine Co-authored-by: Pablo Brasero <pablo@pablobm.com>
- Loading branch information
Showing
40 changed files
with
10,579 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# http://ddollar.github.com/foreman/ | ||
RACK_ENV=development | ||
SECRET_KEY_BASE=development_secret | ||
PORT=3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb | ||
js: yarn build --watch | ||
css: yarn build:css --watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.