From beafa245f7a6c9912d7edafa57851cdc9a3f6d86 Mon Sep 17 00:00:00 2001 From: Saurabh Bhatia Date: Mon, 15 Jan 2024 16:48:14 +1100 Subject: [PATCH] Cleanup unused libraries and prepare for esbuild --- .github/workflows/ci.yml | 1 + Gemfile | 3 --- Gemfile.lock | 13 ------------- app/javascript/controllers/index.js | 3 --- app/views/dashboard/home/index.html.erb | 7 ++----- config/importmap.rb | 2 -- 6 files changed, 3 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 152319ee..d29b798c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,5 +50,6 @@ jobs: POSTGRES_PASSWORD: postgres POSTGRES_PORT: 5432 run: | + bundle exec rails test:prepare bundle exec rails assets:precompile bundle exec rspec \ No newline at end of file diff --git a/Gemfile b/Gemfile index 89d15704..660186f4 100644 --- a/Gemfile +++ b/Gemfile @@ -38,7 +38,6 @@ gem "redis", "~> 5.0" gem "sidekiq" gem "invisible_captcha" -gem "vanilla_nested", github: "arielj/vanilla-nested", branch: :main # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] # gem "kredis" gem "money-rails" @@ -57,8 +56,6 @@ gem "flipper-active_record" gem "flipper-ui" gem "meta-tags" gem "pg_search" -gem "chartkick" -gem "groupdate" gem "httparty" gem "dotenv-rails" gem "honeybadger" diff --git a/Gemfile.lock b/Gemfile.lock index 1e229f8a..50aef29c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,3 @@ -GIT - remote: https://github.com/arielj/vanilla-nested.git - revision: cab8f390dc99eed933952f6fcc14603bad30c6a8 - branch: main - specs: - vanilla_nested (1.7.0) - GIT remote: https://github.com/dabit/annotate_models.git revision: b0d0041e06137514fa2bf5d2e10ca4af101cbfb9 @@ -125,7 +118,6 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartkick (5.0.5) concurrent-ruby (1.2.2) connection_pool (2.4.1) crass (1.0.6) @@ -178,8 +170,6 @@ GEM graphql (>= 1.8, < 2.2) rails (>= 4.2, < 7.1) zeitwerk - groupdate (6.4.0) - activesupport (>= 6.1) hashie (5.0.0) honeybadger (5.4.1) httparty (0.21.0) @@ -467,7 +457,6 @@ DEPENDENCIES aws-sdk-s3 bootsnap capybara - chartkick debug devise dotenv-rails @@ -479,7 +468,6 @@ DEPENDENCIES graphiql-rails graphql graphql_devise - groupdate honeybadger httparty image_processing (~> 1.2) @@ -511,7 +499,6 @@ DEPENDENCIES tailwindcss-rails turbo-rails (~> 1.5.0) tzinfo-data - vanilla_nested! view_component web-console webdrivers diff --git a/app/javascript/controllers/index.js b/app/javascript/controllers/index.js index e5036762..8e5674c5 100644 --- a/app/javascript/controllers/index.js +++ b/app/javascript/controllers/index.js @@ -4,9 +4,6 @@ import { application } from "controllers/application" import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading" import { Tabs, Toggle, Dropdown, Modal } from "tailwindcss-stimulus-components" import * as ActiveStorage from "@rails/activestorage" -import "vanilla-nested" -import "chartkick" -import "Chart.bundle" // Eager load all controllers defined in the import map under controllers/**/*_controller ActiveStorage.start() diff --git a/app/views/dashboard/home/index.html.erb b/app/views/dashboard/home/index.html.erb index 34e5888f..8ac066a8 100644 --- a/app/views/dashboard/home/index.html.erb +++ b/app/views/dashboard/home/index.html.erb @@ -1,9 +1,6 @@

Dashboard

-

Coming Soon, please use links of the left

- <% if current_user.store %> -

Chart only for representational purposes

- <%= line_chart current_user.store.products.group_by_day(:created_at).count %> - <% end %> +

Welcome to your Dashboard

+

Please use links on the left to navigate your Dashboard

\ No newline at end of file diff --git a/config/importmap.rb b/config/importmap.rb index 73d0e06c..f873f3fc 100644 --- a/config/importmap.rb +++ b/config/importmap.rb @@ -14,8 +14,6 @@ pin "vanilla-nested", to: "vanilla_nested.js", preload: true pin "@hotwired/turbo", to: "https://ga.jspm.io/npm:@hotwired/turbo@7.3.0/dist/turbo.es2017-esm.js" pin "@rails/actioncable/src", to: "https://ga.jspm.io/npm:@rails/actioncable@7.0.4-2/src/index.js" -pin "chartkick", to: "chartkick.js" -pin "Chart.bundle", to: "Chart.bundle.js" pin "pdf.js", to: "https://ga.jspm.io/npm:pdf.js@0.1.0/index.js" pin "buffer", to: "https://ga.jspm.io/npm:@jspm/core@2.0.1/nodelibs/browser/buffer.js" pin "child_process", to: "https://ga.jspm.io/npm:@jspm/core@2.0.1/nodelibs/browser/child_process.js"