Allow user to configure transformer through cl argument

Reviewed By: frantic

Differential Revision: D2547435

fb-gh-sync-id: 77016ee5beba854a4cb58e9ac04b91a7dd76cf3e
This commit is contained in:
Martín Bigio
2015-10-16 13:25:14 -07:00
committed by facebook-github-bot-3
parent 01f90054cc
commit 5977f494fc
5 changed files with 13 additions and 11 deletions

View File

@@ -36,6 +36,11 @@ function _bundle(argv, config, resolve, reject) {
description: 'Either "ios" or "android"',
type: 'string',
required: true,
}, {
command: 'transformer',
description: 'Specify a custom transformer to be used (absolute path)',
type: 'string',
default: require.resolve('../../../packager/transformer'),
}, {
command: 'dev',
description: 'If false, warnings are disabled and the bundle is minified',
@@ -64,7 +69,7 @@ function _bundle(argv, config, resolve, reject) {
projectRoots: config.getProjectRoots(),
assetRoots: config.getAssetRoots(),
blacklistRE: config.getBlacklistRE(args.platform),
transformModulePath: config.getTransformModulePath(),
transformModulePath: args.transformer,
};
const requestOpts = {