From 59b9dc8829377e9b8a048669bde8fd737c6166f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Bigio?= Date: Mon, 7 Sep 2015 01:23:21 -0700 Subject: [PATCH] [react-packager] Add command line option to reset cache on OSS --- packager/packager.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packager/packager.js b/packager/packager.js index 8f0f08007..b5f789699 100644 --- a/packager/packager.js +++ b/packager/packager.js @@ -59,6 +59,14 @@ var options = parseCommandLine([{ type: 'string', default: require.resolve('./transformer.js'), 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) { @@ -229,6 +237,7 @@ function getAppMiddleware(options) { transformModulePath: transformerPath, assetRoots: options.assetRoots, assetExts: ['png', 'jpeg', 'jpg'], + resetCache: options.resetCache || options['reset-cache'], polyfillModuleNames: [ require.resolve( '../Libraries/JavaScriptAppEngine/polyfills/document.js'