Introduce configuration template
Summary: @public We're rolling out a replacement for `local-cli`. As part of the process we moved many hardcoded values into a JS based configuration file. Reviewed By: @vjeux Differential Revision: D2533111 fb-gh-sync-id: 7250bddee9989b089ded409104e098ef15d79498
This commit is contained in:
parent
12a68a8183
commit
144f8598c2
|
@ -40,6 +40,10 @@ module.exports = yeoman.generators.NamedBase.extend({
|
|||
{ 'Libraries\/react-native\/react-native-interface.js' : 'node_modules/react-native/Libraries/react-native/react-native-interface.js' }
|
||||
);
|
||||
|
||||
this.fs.copy(
|
||||
this.templatePath('rn-cli.config.js'),
|
||||
this.destinationPath('rn-cli.config.js')
|
||||
);
|
||||
this.fs.copy(
|
||||
this.templatePath('_gitignore'),
|
||||
this.destinationPath('.gitignore')
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
var blacklist = require('./node_modules/react-native/packager/blacklist');
|
||||
|
||||
var config = {
|
||||
getProjectRoots() {
|
||||
return this._getRoots();
|
||||
},
|
||||
|
||||
getAssetRoots() {
|
||||
return this._getRoots();
|
||||
},
|
||||
|
||||
getBlacklistRE() {
|
||||
return blacklist('');
|
||||
},
|
||||
|
||||
getTransformModulePath() {
|
||||
return require.resolve('./node_modules/react-native/packager/transformer');
|
||||
},
|
||||
|
||||
_getRoots() {
|
||||
return [__dirname];
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = config;
|
Loading…
Reference in New Issue