diff --git a/.gitignore b/.gitignore index ebfa704..ccca47c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,3 @@ .log .sqlite3 /test/dummy/tmp -/node_modules diff --git a/Gemfile b/Gemfile index e550bbe..5797428 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,4 @@ gem "appraisal" gem "standardrb" gem "font-awesome-sass", "~> 5.13.1" gem "sqlite3" - gem "sprockets-rails" -gem "jsbundling-rails", "~> 1.1" diff --git a/app/views/layouts/simple_discussion.html.erb b/app/views/layouts/simple_discussion.html.erb index f66a978..b5ca4e9 100644 --- a/app/views/layouts/simple_discussion.html.erb +++ b/app/views/layouts/simple_discussion.html.erb @@ -76,6 +76,44 @@ <% parent_layout("application") %> -<% SimpleDiscussion::Engine.javascripts.each do |js_path| %> - <%= javascript_include_tag js_path %> -<% end %> + diff --git a/config/locales/en.yml b/config/locales/en.yml index 82e5b61..a6943e4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -57,6 +57,6 @@ en: login: "Log in" commented: "commented:" inappropriate_language_error_message: "contains inappropriate language: %{words}" - unmark_as_solution: "Démarquer comme solution" - mark_as_solution: "Marquer comme solution" + unmark_as_solution: "Unmark as Solution" + mark_as_solution: "Mark as Solution" report_post: "Report Post" diff --git a/lib/simple_discussion/engine.rb b/lib/simple_discussion/engine.rb index e32ac37..5181d2c 100644 --- a/lib/simple_discussion/engine.rb +++ b/lib/simple_discussion/engine.rb @@ -6,24 +6,5 @@ class Engine < ::Rails::Engine config.after_initialize do SimpleDiscussion::Engine.routes.default_url_options = ActionMailer::Base.default_url_options end - - # javascripts assets precompiled for dropdown and markdown text editor - @@javascripts = [] - - initializer "simple_discussion.assets.precompile" do |app| - app.config.assets.precompile += [ - "simple_discussion/application.js" - ] - end - - def self.add_javascript(script) - @@javascripts << script - end - - def self.javascripts - @@javascripts - end - - add_javascript "simple_discussion/application.js" end end diff --git a/package.json b/package.json deleted file mode 100644 index 688eee6..0000000 --- a/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "simple_discussion", - "version": "1.0.0", - "description": "javascript asset precompiling for this gem", - "author": "CircuitVerse", - "license": "MIT", - "homepage": "https://github.com/circuitverse/simple_discussion#readme", - "scripts": { - "build": "esbuild app/assets/javascripts/simple_discussion/application.js --bundle --sourcemap --outdir=app/assets/builds/simple_discussion --public-path=/assets/simple_discussion" - }, - "dependencies": { - "@hotwired/stimulus": "^3.2.2", - "esbuild": "^0.20.2" - } -}