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

Try move to importmap #1445

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ yarn-debug.log*
/yarn-error.log
yarn-debug.log*
.yarn-integrity

/app/assets/builds/*
!/app/assets/builds/.keep
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ source "https://rubygems.org"
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }

gem "jbuilder"
gem "rails", "~> 8.0.0.beta1"
gem "rails", "~> 8.0.0.rc2"
gem "rails_autolink"
gem "sass-rails"
gem "shakapacker", "~> 7.2.1"
gem "turbolinks"
gem "uglifier"
gem "sass-rails"
gem "importmap-rails", "~> 2.0"

gem "view_component", "~> 2.83"

Expand Down Expand Up @@ -107,3 +107,5 @@ group :development, :test do

gem "rubocop-rails-omakase", require: false
end

gem "tailwindcss-rails", "~> 3.0"
130 changes: 65 additions & 65 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,65 @@ GEM
specs:
action-store (1.1.3)
rails (>= 5.2)
actioncable (8.0.0.rc1)
actionpack (= 8.0.0.rc1)
activesupport (= 8.0.0.rc1)
actioncable (8.0.0.rc2)
actionpack (= 8.0.0.rc2)
activesupport (= 8.0.0.rc2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (8.0.0.rc1)
actionpack (= 8.0.0.rc1)
activejob (= 8.0.0.rc1)
activerecord (= 8.0.0.rc1)
activestorage (= 8.0.0.rc1)
activesupport (= 8.0.0.rc1)
actionmailbox (8.0.0.rc2)
actionpack (= 8.0.0.rc2)
activejob (= 8.0.0.rc2)
activerecord (= 8.0.0.rc2)
activestorage (= 8.0.0.rc2)
activesupport (= 8.0.0.rc2)
mail (>= 2.8.0)
actionmailer (8.0.0.rc1)
actionpack (= 8.0.0.rc1)
actionview (= 8.0.0.rc1)
activejob (= 8.0.0.rc1)
activesupport (= 8.0.0.rc1)
actionmailer (8.0.0.rc2)
actionpack (= 8.0.0.rc2)
actionview (= 8.0.0.rc2)
activejob (= 8.0.0.rc2)
activesupport (= 8.0.0.rc2)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (8.0.0.rc1)
actionview (= 8.0.0.rc1)
activesupport (= 8.0.0.rc1)
actionpack (8.0.0.rc2)
actionview (= 8.0.0.rc2)
activesupport (= 8.0.0.rc2)
nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actiontext (8.0.0.rc1)
actionpack (= 8.0.0.rc1)
activerecord (= 8.0.0.rc1)
activestorage (= 8.0.0.rc1)
activesupport (= 8.0.0.rc1)
actiontext (8.0.0.rc2)
actionpack (= 8.0.0.rc2)
activerecord (= 8.0.0.rc2)
activestorage (= 8.0.0.rc2)
activesupport (= 8.0.0.rc2)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (8.0.0.rc1)
activesupport (= 8.0.0.rc1)
actionview (8.0.0.rc2)
activesupport (= 8.0.0.rc2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (8.0.0.rc1)
activesupport (= 8.0.0.rc1)
activejob (8.0.0.rc2)
activesupport (= 8.0.0.rc2)
globalid (>= 0.3.6)
activemodel (8.0.0.rc1)
activesupport (= 8.0.0.rc1)
activerecord (8.0.0.rc1)
activemodel (= 8.0.0.rc1)
activesupport (= 8.0.0.rc1)
activemodel (8.0.0.rc2)
activesupport (= 8.0.0.rc2)
activerecord (8.0.0.rc2)
activemodel (= 8.0.0.rc2)
activesupport (= 8.0.0.rc2)
timeout (>= 0.4.0)
activestorage (8.0.0.rc1)
actionpack (= 8.0.0.rc1)
activejob (= 8.0.0.rc1)
activerecord (= 8.0.0.rc1)
activesupport (= 8.0.0.rc1)
activestorage (8.0.0.rc2)
actionpack (= 8.0.0.rc2)
activejob (= 8.0.0.rc2)
activerecord (= 8.0.0.rc2)
activesupport (= 8.0.0.rc2)
marcel (~> 1.0)
activesupport (8.0.0.rc1)
activesupport (8.0.0.rc2)
base64
benchmark (>= 0.3)
bigdecimal
Expand Down Expand Up @@ -213,6 +213,10 @@ GEM
image_processing (1.13.0)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
importmap-rails (2.0.3)
actionpack (>= 6.0.0)
activesupport (>= 6.0.0)
railties (>= 6.0.0)
io-console (0.7.2)
irb (1.14.1)
rdoc (>= 4.0.0)
Expand Down Expand Up @@ -331,7 +335,6 @@ GEM
omniauth-oauth2 (>= 1.7.3)
orm_adapter (0.5.0)
ostruct (0.6.0)
package_json (0.1.0)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -367,29 +370,27 @@ GEM
rack-protection (4.0.0)
base64 (>= 0.1.0)
rack (>= 3.0.0, < 4)
rack-proxy (0.7.7)
rack
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (8.0.0.rc1)
actioncable (= 8.0.0.rc1)
actionmailbox (= 8.0.0.rc1)
actionmailer (= 8.0.0.rc1)
actionpack (= 8.0.0.rc1)
actiontext (= 8.0.0.rc1)
actionview (= 8.0.0.rc1)
activejob (= 8.0.0.rc1)
activemodel (= 8.0.0.rc1)
activerecord (= 8.0.0.rc1)
activestorage (= 8.0.0.rc1)
activesupport (= 8.0.0.rc1)
rails (8.0.0.rc2)
actioncable (= 8.0.0.rc2)
actionmailbox (= 8.0.0.rc2)
actionmailer (= 8.0.0.rc2)
actionpack (= 8.0.0.rc2)
actiontext (= 8.0.0.rc2)
actionview (= 8.0.0.rc2)
activejob (= 8.0.0.rc2)
activemodel (= 8.0.0.rc2)
activerecord (= 8.0.0.rc2)
activestorage (= 8.0.0.rc2)
activesupport (= 8.0.0.rc2)
bundler (>= 1.15.0)
railties (= 8.0.0.rc1)
railties (= 8.0.0.rc2)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
Expand All @@ -407,9 +408,9 @@ GEM
actionview (> 3.1)
activesupport (> 3.1)
railties (> 3.1)
railties (8.0.0.rc1)
actionpack (= 8.0.0.rc1)
activesupport (= 8.0.0.rc1)
railties (8.0.0.rc2)
actionpack (= 8.0.0.rc2)
activesupport (= 8.0.0.rc2)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
Expand Down Expand Up @@ -498,13 +499,6 @@ GEM
sprockets-rails
tilt
securerandom (0.3.1)
semantic_range (3.0.0)
shakapacker (7.2.3)
activesupport (>= 5.2)
package_json
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
sidekiq (7.3.4)
connection_pool (>= 2.3.0)
logger
Expand All @@ -529,6 +523,11 @@ GEM
sprockets (>= 3.0.0)
ssrf_filter (1.1.2)
stringio (3.1.1)
tailwindcss-rails (3.0.0)
railties (>= 7.0.0)
tailwindcss-ruby
tailwindcss-ruby (3.4.14-arm64-darwin)
tailwindcss-ruby (3.4.14-x86_64-linux)
thor (1.3.2)
tilt (2.4.0)
timeout (0.4.1)
Expand Down Expand Up @@ -588,6 +587,7 @@ DEPENDENCIES
html-pipeline (~> 2.14)
html-pipeline-auto-correct
http_accept_language
importmap-rails (~> 2.0)
jbuilder
jieba-rb
kaminari
Expand All @@ -611,7 +611,7 @@ DEPENDENCIES
qiniu
rack-attack
rack-cors
rails (~> 8.0.0.beta1)
rails (~> 8.0.0.rc2)
rails-i18n
rails-settings-cached
rails_autolink
Expand All @@ -623,11 +623,11 @@ DEPENDENCIES
ruby-push-notifications
rucaptcha
sass-rails
shakapacker (~> 7.2.1)
sidekiq (< 8)
sidekiq-cron
social-share-button
spring
tailwindcss-rails (~> 3.0)
turbolinks
twemoji
uglifier
Expand Down
3 changes: 3 additions & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
web: env RUBY_DEBUG_OPEN=true bin/rails server
css: bun run build:css --watch
css: bin/rails tailwindcss:watch
Empty file added app/assets/builds/.keep
Empty file.
12 changes: 12 additions & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js
//= link turbolinks-prefetch/index.js
//= link bootstrap/dist/js/bootstrap.js
//= link bootstrap-select/dist/js/bootstrap-select.js
//= link jquery.caret/src/jquery.caret.js
//= link jquery/dist/jquery.js
//= link dropzone/dist/dropzone.js
//= link backbone/backbone.js
//= link underscore/underscore-umd.js
//= link_tree ../builds
//= link_directory ../stylesheets .scss
2 changes: 2 additions & 0 deletions app/assets/stylesheets/admin.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "application.tailwind";
@import "admin/index";
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import "homeland/application.tailwind";
@import "~homeland/index";
@import "~homeland/dark-mode";
@import "homeland/index";
@import "homeland/dark-mode";

body,
p,
Expand Down
2 changes: 2 additions & 0 deletions app/assets/stylesheets/front.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "application.tailwind";
@import "front/index";
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "~homeland/_vars";
@import "homeland/_vars";

#home_index {
line-height: 160%;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@import "~homeland/index";

@import "~vendor/atwho";
@import "~vendor/jquery.fluidbox";
@import "~vendor/tooltipster.bundle";
@import "~vendor/social-share-button/index";
@import "homeland/index";
@import "vendor/atwho";
@import "vendor/jquery.fluidbox";
@import "vendor/tooltipster.bundle";
@import "vendor/social-share-button/index";

@import "notifications";
@import "home";
Expand All @@ -13,7 +12,7 @@
@import "search";
@import "toc";
@import "highlight";
@import "~homeland/dark-mode";
@import "homeland/dark-mode";

.page-topics {
.navbar-fixed-active {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "~homeland/_vars";
@import "homeland/_vars";
.search-results {
.pagination {
margin-top: 25px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "~homeland/_vars";
@import "homeland/_vars";

.team-header {
background: var(--sub-navbar-background-color);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "~homeland/_vars";
@import "homeland/_vars";

.toc-container {
display: none;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "~homeland/_vars";
@import "homeland/_vars";
.subnav {
margin-bottom: -18px;
.nav-tabs {
Expand Down
44 changes: 44 additions & 0 deletions app/assets/stylesheets/homeland/bootstrap_custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*!
* Bootstrap v5.1.3 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/

// scss-docs-start import-stack
// Configuration
@import "bootstrap/scss/mixins";
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/maps";
@import "bootstrap/scss/utilities";

// Layout & components
@import "bootstrap/scss/root";
@import "bootstrap/scss/reboot";
@import "bootstrap/scss/images";
@import "bootstrap/scss/grid";
@import "bootstrap/scss/forms";
@import "bootstrap/scss/buttons";
@import "bootstrap/scss/transitions";
@import "bootstrap/scss/dropdown";
@import "bootstrap/scss/button-group";
@import "bootstrap/scss/nav";
@import "bootstrap/scss/card";
@import "bootstrap/scss/breadcrumb";
@import "bootstrap/scss/pagination";
@import "bootstrap/scss/badge";
@import "bootstrap/scss/alert";
@import "bootstrap/scss/list-group";
@import "bootstrap/scss/close";
@import "bootstrap/scss/modal";
@import "bootstrap/scss/tooltip";
@import "bootstrap/scss/popover";
@import "bootstrap/scss/spinners";

// Helpers
@import "bootstrap/scss/helpers";

// Utilities
@import "bootstrap/scss/utilities/api";
// scss-docs-end import-stack
1 change: 0 additions & 1 deletion app/javascript/admin.scss

This file was deleted.

1 change: 0 additions & 1 deletion app/javascript/application.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import "homeland/index";
import "vendor/bootstrap";
import "front/index";
Loading
Loading