Skip to content

Commit

Permalink
Add components stats
Browse files Browse the repository at this point in the history
  • Loading branch information
florentferry committed Jul 29, 2018
1 parent bc8ad42 commit ce8b91f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/komponent/rails/tasks/komponent.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

task stats: 'komponent:statsetup'

namespace :komponent do
task :statsetup do
require 'rails/code_statistics'
::STATS_DIRECTORIES << ['Components', './frontend/components']
end
end
4 changes: 4 additions & 0 deletions lib/komponent/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

module Komponent
class Railtie < Rails::Railtie
rake_tasks do
load 'komponent/rails/tasks/komponent.rake'
end

config.komponent = ActiveSupport::OrderedOptions.new
config.komponent.root = nil
config.komponent.component_paths = []
Expand Down

0 comments on commit ce8b91f

Please sign in to comment.