Skip to content

Commit

Permalink
remove webpacker + install vite-rails + make the editor work with Vit…
Browse files Browse the repository at this point in the history
…e and Tailwindcss3
  • Loading branch information
did committed Oct 31, 2022
1 parent 8e41357 commit 632c9be
Show file tree
Hide file tree
Showing 536 changed files with 1,612 additions and 10,798 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ coverage/
.env
podman.sh
template.dev.rb

# Vite Ruby
/public/vite*
/public/maglev*
node_modules
# Vite uses dotenv and suggests to ignore local-only env files. See
# https://vitejs.dev/guide/env-and-mode.html#env-files
*.local

10 changes: 9 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PATH
kaminari (~> 1.2.1)
maglev-injectable (~> 2.1.1)
rails (>= 6, <= 7.1)
webpacker (~> 5.1)
vite_rails (>= 3, <= 4)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -77,6 +77,7 @@ GEM
crass (1.0.6)
diff-lcs (1.5.0)
docile (1.4.0)
dry-cli (0.7.0)
erubi (1.11.0)
factory_bot (6.2.1)
activesupport (>= 5.0.0)
Expand Down Expand Up @@ -237,6 +238,13 @@ GEM
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.3.0)
vite_rails (3.0.12)
railties (>= 5.1, < 8)
vite_ruby (~> 3.0, >= 3.2.2)
vite_ruby (3.2.8)
dry-cli (~> 0.7.0)
rack-proxy (~> 0.6, >= 0.6.1)
zeitwerk (~> 2.2)
webpacker (5.4.3)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
Expand Down
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_files.include('lib/**/*.rb')
end

require 'vite_ruby'
ViteRuby.install_tasks
ViteRuby.config.root # Ensure the engine is set as the root.

APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__)
load 'rails/tasks/engine.rake'
load 'rails/tasks/statistics.rake'
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/maglev/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ class ApplicationController < ::ApplicationController

protect_from_forgery with: :exception

helper_method :services, :use_engine_webpacker?
helper_method :services, :inside_engine?

private

def use_engine_webpacker?
def inside_engine?
true
end
end
Expand Down
File renamed without changes.
Loading

0 comments on commit 632c9be

Please sign in to comment.