mirror of https://github.com/status-im/metro.git
[react-packager] Add command line option to reset cache on OSS
This commit is contained in:
parent
b7d76074a0
commit
4b14a2f783
|
@ -59,6 +59,14 @@ var options = parseCommandLine([{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: require.resolve('./transformer.js'),
|
default: require.resolve('./transformer.js'),
|
||||||
description: 'Specify a custom transformer to be used (absolute path)'
|
description: 'Specify a custom transformer to be used (absolute path)'
|
||||||
|
}, {
|
||||||
|
command: 'resetCache',
|
||||||
|
description: 'Removes cached files',
|
||||||
|
default: false,
|
||||||
|
}, {
|
||||||
|
command: 'reset-cache',
|
||||||
|
description: 'Removes cached files',
|
||||||
|
default: false,
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
if (options.projectRoots) {
|
if (options.projectRoots) {
|
||||||
|
@ -229,6 +237,7 @@ function getAppMiddleware(options) {
|
||||||
transformModulePath: transformerPath,
|
transformModulePath: transformerPath,
|
||||||
assetRoots: options.assetRoots,
|
assetRoots: options.assetRoots,
|
||||||
assetExts: ['png', 'jpeg', 'jpg'],
|
assetExts: ['png', 'jpeg', 'jpg'],
|
||||||
|
resetCache: options.resetCache || options['reset-cache'],
|
||||||
polyfillModuleNames: [
|
polyfillModuleNames: [
|
||||||
require.resolve(
|
require.resolve(
|
||||||
'../Libraries/JavaScriptAppEngine/polyfills/document.js'
|
'../Libraries/JavaScriptAppEngine/polyfills/document.js'
|
||||||
|
|
Loading…
Reference in New Issue