2015-10-20 20:47:41 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = [
|
|
|
|
{
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--entry-file <path>',
|
2015-10-20 20:47:41 +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',
|
2015-10-20 20:47:41 +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',
|
2015-10-20 20:47:41 +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',
|
2016-07-30 15:59:16 +00:00
|
|
|
parse: (val) => val === 'false' ? false : true,
|
2015-10-20 20:47:41 +00:00
|
|
|
default: true,
|
|
|
|
}, {
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--bundle-output <string>',
|
2015-10-20 20:47:41 +00:00
|
|
|
description: 'File name where to store the resulting bundle, ex. /tmp/groups.bundle',
|
2015-10-28 20:16:40 +00:00
|
|
|
}, {
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--bundle-encoding [string]',
|
2015-10-28 20:16:40 +00:00
|
|
|
description: 'Encoding the bundle should be written in (https://nodejs.org/api/buffer.html#buffer_buffer).',
|
|
|
|
default: 'utf8',
|
2017-06-13 16:11:57 +00:00
|
|
|
}, {
|
|
|
|
command: '--max-workers [number]',
|
|
|
|
description: 'Specifies the maximum number of workers the worker-pool ' +
|
|
|
|
'will spawn for transforming files. This defaults to the number of the ' +
|
|
|
|
'cores available on your machine.',
|
|
|
|
parse: (workers: string) => Number(workers),
|
2015-10-20 20:47:41 +00:00
|
|
|
}, {
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--sourcemap-output [string]',
|
2015-10-20 20:47:41 +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]',
|
|
|
|
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,
|
2015-10-20 20:47:41 +00:00
|
|
|
}, {
|
2016-07-30 15:59:16 +00:00
|
|
|
command: '--assets-dest [string]',
|
2015-10-20 20:47:41 +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,
|
2016-04-29 17:37:30 +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,
|
2016-11-24 17:56:30 +00:00
|
|
|
}, {
|
|
|
|
command: '--read-global-cache',
|
|
|
|
description: 'Try to fetch transformed JS code from the global cache, if configured.',
|
|
|
|
default: false,
|
2016-07-30 15:59:16 +00:00
|
|
|
},
|
2015-10-20 20:47:41 +00:00
|
|
|
];
|