-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e89d5d7
commit 3364685
Showing
4 changed files
with
59 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var filterImports = require('babel-plugin-filter-imports'); | ||
var featureFlags = require('babel-plugin-feature-flags'); | ||
|
||
module.exports = function() { | ||
var featuresJsonPath = __dirname + '/../config/features.json'; | ||
var featuresJson = fs.readFileSync(featuresJsonPath, { encoding: 'utf8' }); | ||
var features = JSON.parse(featuresJson); | ||
|
||
// TODO explicitly set all features which are not enabled to `false`, so | ||
// they are stripped --> make this configurable or pass features | ||
// | ||
// for (var feature in features) { | ||
// if (features[feature] !== true) { | ||
// features[feature] = false; | ||
// } | ||
// } | ||
|
||
return [ | ||
featureFlags({ | ||
import: { module: 'ember-data/-private/features' }, | ||
features: features | ||
}), | ||
|
||
filterImports({ | ||
'ember-data/-private/debug': [ | ||
'assert', | ||
'assertPolymorphicType', | ||
'debug', | ||
'deprecate', | ||
'info', | ||
'runInDebug', | ||
'warn', | ||
'debugSeal' | ||
] | ||
}) | ||
]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters