Run the relay compiler on save.
By default relay --watch
- requires
watchman
to be installed - runs as a separate command
Watchman is cumbersome to install and frequently throws errors within docker containers.
Install options:
- Download from the marketplace
- Install from the command line:
code --install-extension pinterest.relay-watcher
- Search for
Relay Watcher
in the VS Code extensions panel
- Run the relay compiler on save
- Requires no configuration
- Supports multiple package managers:
npm
andyarn
- Supports VSCode Remote
- Uses VSCode's internal file watcher instead of
watchman
.
-
relay.config.js
file(s) in the workspace root or subdirectories. -
relay-compiler
package should be installed next to each Relay configuration file
Setting | Type (default) | Description |
---|---|---|
relayWatcher.enableTelemetry |
boolean (true ) |
Enable/disable telemetry |
relayWatcher.logLevel |
enum: 'info', 'debug', 'off' ('info' ) |
Output log level |
relayWatcher.showOutputOnError |
boolean (true ) |
Show output log when relay compiler throws an error |
Setting | Description |
---|---|
relayWatcher.enable |
Enable the extension |
relayWatcher.disable |
Disable the extension |
relayWatcher.showOutputChannel |
Show the output channel |
See CHANGELOG.md
Publish a new version:
- Update
CHANGELOG.md
and add a new version - Publish with
vsce
npm i -g vsce
vsce publish patch
- Activate if there are 1 or multiple
relay.config.js
file(s) within the workspace. - For each of the configuration files:
- Check if
relay-compiler
is installed (if not, the configuration file gets ignored) - Check which package manager is installed by searching for a
yarn.lock
- Find the
src
, source directory
- Check if
- Use
relay-config
to support relay.config.json and package.json configurations (legacy)