Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,19 @@ Generates a JavaScript bundle containing the specified entrypoint and its descen
## `serve`

Starts a Metro server on the given port, building bundles on the fly.

## `get-dependencies`

Lists dependencies.

### Options

| Option | Description |
|---|---|
| `entry-file` | Absolute path to the root JS file |
| `output` | File name where to store the output, ex. /tmp/dependencies.txt |
| `platform` | The platform extension used for selecting modules |
| `transformer` | Specify a custom transformer to be used |
| `max-workers` | 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. |
| `dev` | If false, skip all dev-only code path |
| `verbose` | Enables logging |
5 changes: 3 additions & 2 deletions packages/metro/src/commands/dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function dependencies(args: any, config: any) {
}

module.exports = () => ({
command: 'dependencies',
command: 'get-dependencies',
description: 'List dependencies',
builder: (yargs: Yargs) => {
yargs.option('entry-file', {
Expand All @@ -86,7 +86,7 @@ module.exports = () => ({
});
yargs.option('transformer', {
type: 'string',
describe: 'The platform extension used for selecting modules',
describe: 'Specify a custom transformer to be used',
});
yargs.option('max-workers', {
type: 'number',
Expand All @@ -103,6 +103,7 @@ module.exports = () => ({
yargs.option('verbose', {
type: 'boolean',
default: false,
description: 'Enables logging',
});
},
handler: makeAsyncCommand(async (argv: any) => {
Expand Down