Skip to content

Commit

Permalink
Add a *secret* flag to skip ember compilation
Browse files Browse the repository at this point in the history
Fixes #17
  • Loading branch information
rwz committed Dec 10, 2014
1 parent 99a8930 commit 32d83e4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/ember-cli/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ class Railtie < Rails::Railtie
end

initializer "ember-cli-rails.enable" do
EmberCLI.enable! if EmberCLI::Helpers.non_production?
EmberCLI.enable! if enable?
end

rake_tasks do
require "sprockets/rails/task"
EmberCLI::Helpers.override_assets_precompile_task!
Helpers.override_assets_precompile_task!
end

def enable?
!skip_ember_cli_init? && Helpers.non_production?
end

def skip_ember_cli_init?
ENV.fetch("SKIP_EMBER", false)
end
end
end

0 comments on commit 32d83e4

Please sign in to comment.