Skip to content

Commit

Permalink
feat(setup): add webpacker gem only when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
gmq committed Oct 30, 2020
1 parent 7cbe903 commit 5b5edb6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ gemspec
# gem "debugger"
gem "activeadmin"
gem "devise"
gem "webpacker", "~> 5.0"
9 changes: 0 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ GEM
puma (4.3.5)
nio4r (~> 2.0)
rack (2.2.2)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.1)
Expand Down Expand Up @@ -290,7 +288,6 @@ GEM
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
semantic_range (2.3.0)
shellany (0.0.1)
shoulda-matchers (4.2.0)
activesupport (>= 4.2.0)
Expand All @@ -316,11 +313,6 @@ GEM
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webpacker (5.2.1)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
Expand Down Expand Up @@ -353,7 +345,6 @@ DEPENDENCIES
shoulda-matchers
sqlite3
webdrivers
webpacker (~> 5.0)

BUNDLED WITH
1.17.2
3 changes: 3 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ cd spec/dummy
git checkout .
git clean -f -d
rake db:setup
bundle config frozen false
if [ "$1" = "--use_webpacker" ]; then
bundle add webpacker --version "~>5.0"
bundle exec rails webpacker:install
bundle exec rails generate active_admin:install --skip-users --skip-comments --use_webpacker
else
set +e
bundle remove webpacker
yarn remove @activeadmin/activeadmin @rails/webpacker activeadmin_addons webpack-dev-server
set -e
bundle exec rails generate active_admin:install --skip-users --skip-comments
Expand Down

0 comments on commit 5b5edb6

Please sign in to comment.