2015-10-20 20:47:41 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2018-05-11 19:43:49 +00:00
|
|
|
*
|
|
|
|
* @format
|
2015-10-20 20:47:41 +00:00
|
|
|
*/
|
2018-05-11 19:43:49 +00:00
|
|
|
|
2015-10-20 20:47:41 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = [
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--entry-file <path>',
|
2018-05-11 19:43:49 +00:00
|
|
|
description:
|
|
|
|
'Path to the root JS file, either absolute or relative to JS root',
|
|
|
|
},
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--platform [string]',
|
2015-10-20 20:47:41 +00:00
|
|
|
description: 'Either "ios" or "android"',
|
2016-07-30 15:59:16 +00:00
|
|
|
default: 'ios',
|
2018-05-11 19:43:49 +00:00
|
|
|
},
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--transformer [string]',
|
2016-09-12 22:11:22 +00:00
|
|
|
description: 'Specify a custom transformer to be used',
|
2018-05-11 19:43:49 +00:00
|
|
|
},
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--dev [boolean]',
|
2015-10-20 20:47:41 +00:00
|
|
|
description: 'If false, warnings are disabled and the bundle is minified',
|
2018-05-11 19:43:49 +00:00
|
|
|
parse: val => (val === 'false' ? false : true),
|
2015-10-20 20:47:41 +00:00
|
|
|
default: true,
|
2018-05-11 19:43:49 +00:00
|
|
|
},
|
|
|
|
{
|
2018-01-30 08:35:40 +00:00
|
|
|
command: '--minify [boolean]',
|
2018-05-11 19:43:49 +00:00
|
|
|
description:
|
|
|
|
'Allows overriding whether bundle is minified. This defaults to ' +
|
2018-01-30 08:35:40 +00:00
|
|
|
'false if dev is true, and true if dev is false. Disabling minification ' +
|
|
|
|
'can be useful for speeding up production builds for testing purposes.',
|
2018-05-11 19:43:49 +00:00
|
|
|
parse: val => (val === 'false' ? false : true),
|
|
|
|
},
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--bundle-output <string>',
|
2018-05-11 19:43:49 +00:00
|
|
|
description:
|
|
|
|
'File name where to store the resulting bundle, ex. /tmp/groups.bundle',
|
|
|
|
},
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--bundle-encoding [string]',
|
2018-05-11 19:43:49 +00:00
|
|
|
description:
|
|
|
|
'Encoding the bundle should be written in (https://nodejs.org/api/buffer.html#buffer_buffer).',
|
2015-10-28 20:16:40 +00:00
|
|
|
default: 'utf8',
|
2018-05-11 19:43:49 +00:00
|
|
|
},
|
|
|
|
{
|
2017-06-13 16:11:57 +00:00
|
|
|
command: '--max-workers [number]',
|
2018-05-11 19:43:49 +00:00
|
|
|
description:
|
|
|
|
'Specifies the maximum number of workers the worker-pool ' +
|
2017-06-13 16:11:57 +00:00
|
|
|
'will spawn for transforming files. This defaults to the number of the ' +
|
|
|
|
'cores available on your machine.',
|
|
|
|
parse: (workers: string) => Number(workers),
|
2018-05-11 19:43:49 +00:00
|
|
|
},
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--sourcemap-output [string]',
|
2018-05-11 19:43:49 +00:00
|
|
|
description:
|
|
|
|
'File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map',
|
|
|
|
},
|
|
|
|
{
|
2017-01-05 04:45:55 +00:00
|
|
|
command: '--sourcemap-sources-root [string]',
|
2018-05-11 19:43:49 +00:00
|
|
|
description:
|
|
|
|
"Path to make sourcemap's sources entries relative to, ex. /root/dir",
|
|
|
|
},
|
|
|
|
{
|
2017-04-06 16:21:38 +00:00
|
|
|
command: '--sourcemap-use-absolute-path',
|
|
|
|
description: 'Report SourceMapURL using its full path',
|
|
|
|
default: false,
|
2018-05-11 19:43:49 +00:00
|
|
|
},
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--assets-dest [string]',
|
2018-05-11 19:43:49 +00:00
|
|
|
description:
|
|
|
|
'Directory name where to store assets referenced in the bundle',
|
|
|
|
},
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--verbose',
|
2015-10-20 20:47:41 +00:00
|
|
|
description: 'Enables logging',
|
|
|
|
default: false,
|
2018-05-11 19:43:49 +00:00
|
|
|
},
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--reset-cache',
|
2016-04-29 17:37:30 +00:00
|
|
|
description: 'Removes cached files',
|
2016-07-30 15:59:16 +00:00
|
|
|
default: false,
|
2018-05-11 19:43:49 +00:00
|
|
|
},
|
|
|
|
{
|
2016-11-24 17:56:30 +00:00
|
|
|
command: '--read-global-cache',
|
2018-05-11 19:43:49 +00:00
|
|
|
description:
|
|
|
|
'Try to fetch transformed JS code from the global cache, if configured.',
|
2016-11-24 17:56:30 +00:00
|
|
|
default: false,
|
2016-07-30 15:59:16 +00:00
|
|
|
},
|
2015-10-20 20:47:41 +00:00
|
|
|
];
|