Skip to content

Commit

Permalink
remove node modules from assets, enhance assets:precompile with tailw…
Browse files Browse the repository at this point in the history
…ind css build
  • Loading branch information
michelson committed Nov 14, 2023
1 parent 54f4708 commit ec25c35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ end

# Run yarn i18n:export prior to assets precompilation, so i18n json are available for use.
# Rake::Task['assets:precompile'].enhance [ 'locales:build' ]
# Rake::Task["assets:precompile"].enhance ["assets:clear_all"]
# Rake::Task["assets:precompile"].enhance ["assets:clear_all"]
9 changes: 3 additions & 6 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = "1.0"

Rails.application.config.assets.paths << Rails.root.join('node_modules')
Rails.application.config.assets.precompile += %w( tailwind.css )
Rails.application.config.assets.precompile += %w[campaign.css]
Rails.application.config.assets.precompile += %w( embed.js )
Rails.application.config.assets.precompile += %w( new_embed.js )
Rails.application.config.assets.precompile += %w( article.js )
# Rails.application.config.assets.paths << Rails.root.join('node_modules')
Rails.application.config.assets.precompile += %w[campaign.css tailwind.css]
Rails.application.config.assets.precompile += %w[embed.js new_embed.js new_application.js article.js]

Rails.application.config.assets.paths << Rails.root.join('app', 'assets', 'fonts')

Expand Down
2 changes: 2 additions & 0 deletions lib/tasks/utils.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ class Hammer < Thor
include Thor::Actions
end

Rake::Task["assets:precompile"].enhance(["tailwindcss:build"])

namespace :packages do
def hammer(*)
Hammer.new.send(*)
Expand Down

0 comments on commit ec25c35

Please sign in to comment.