Skip to content

Commit

Permalink
Merge pull request #3324 from thomasboyt/defeatureify
Browse files Browse the repository at this point in the history
Defeatureify
  • Loading branch information
wycats committed Sep 6, 2013
2 parents becb90d + cfb7578 commit 556cde4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Assetfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ distros.each do |name, modules|

match "{#{name}.js,#{name}.prod.js}" do
filter HandlebarsPrecompiler
if File.exists?("features.json")
filter EmberDefeatureify
end
filter AddMicroLoader unless name == "ember-template-compiler"
end

Expand Down
21 changes: 21 additions & 0 deletions packages/ember-metal/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,27 @@ Ember.ENV = Ember.ENV || ENV;

Ember.config = Ember.config || {};

/**
Hash of enabled Canary features. Add to before creating your application.
@property FEATURES
@type Hash
*/

Ember.FEATURES = {};

/**
Test that a feature is enabled. Parsed by Ember's build tools to leave
experimental features out of beta/stable builds.
@method isEnabled
@param {string} feature
*/

Ember.FEATURES.isEnabled = function(feature) {
return Ember.FEATURES[feature];
};

// ..........................................................
// BOOTSTRAP
//
Expand Down

0 comments on commit 556cde4

Please sign in to comment.