Add info about the "es" target to the README

master
fatfisz 7 years ago
parent c541911c04
commit d1f62596f1

@ -100,8 +100,8 @@ You can tweak the generated parser with several options:
`peg.generate` `peg.generate`
* `--extra-options-file` — file with additional options (in JSON format) to * `--extra-options-file` — file with additional options (in JSON format) to
pass to `peg.generate` pass to `peg.generate`
* `--format` — format of the generated parser: `amd`, `commonjs`, `globals`, * `--format` — format of the generated parser: `amd`, `commonjs`, `es`,
`umd` (default: `commonjs`) `globals`, `umd` (default: `commonjs`)
* `--optimize` — selects between optimizing the generated parser for parsing * `--optimize` — selects between optimizing the generated parser for parsing
speed (`speed`) or code size (`size`) (default: `speed`) speed (`speed`) or code size (`size`) (default: `speed`)
* `--plugin` — makes PEG.js use a specified plugin (can be specified multiple * `--plugin` — makes PEG.js use a specified plugin (can be specified multiple
@ -142,14 +142,14 @@ object to `peg.generate`. The following options are supported:
`false`) `false`)
* `dependencies` — parser dependencies, the value is an object which maps * `dependencies` — parser dependencies, the value is an object which maps
variables used to access the dependencies in the parser to module IDs used variables used to access the dependencies in the parser to module IDs used
to load them; valid only when `format` is set to `"amd"`, `"commonjs"`, or to load them; valid only when `format` is set to `"amd"`, `"commonjs"`,
`"umd"` (default: `{}`) `"es"`, or `"umd"` (default: `{}`)
* `exportVar` — name of a global variable into which the parser object is * `exportVar` — name of a global variable into which the parser object is
assigned to when no module loader is detected; valid only when `format` is assigned to when no module loader is detected; valid only when `format` is
set to `"globals"` or `"umd"` (default: `null`) set to `"globals"` or `"umd"` (default: `null`)
* `format` — format of the generated parser (`"amd"`, `"bare"`, `"commonjs"`, * `format` — format of the generated parser (`"amd"`, `"bare"`, `"commonjs"`,
`"globals"`, or `"umd"`); valid only when `output` is set to `"source"` `"es"`, `"globals"`, or `"umd"`); valid only when `output` is set to
(default: `"bare"`) `"source"` (default: `"bare"`)
* `optimize`— selects between optimizing the generated parser for parsing * `optimize`— selects between optimizing the generated parser for parsing
speed (`"speed"`) or code size (`"size"`) (default: `"speed"`) speed (`"speed"`) or code size (`"size"`) (default: `"speed"`)
* `output` — if set to `"parser"`, the method will return generated parser * `output` — if set to `"parser"`, the method will return generated parser

Loading…
Cancel
Save