relay-watcher

0.0.7 • Public • Published

VSCode Relay Watcher

Visual Studio Marketplace Version Visual Studio Marketplace Installs

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

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

Features

  • Run the relay compiler on save
  • Requires no configuration
  • Supports multiple package managers: npm and yarn
  • Supports VSCode Remote
  • Uses VSCode's internal file watcher instead of watchman.

Requirements

  • relay.config.js file(s) in the workspace root or subdirectories.
  • relay-compiler package should be installed next to each Relay configuration file

Extension Settings

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

Extension Commands

Setting Description
relayWatcher.enable Enable the extension
relayWatcher.disable Disable the extension
relayWatcher.showOutputChannel Show the output channel

Release Notes

See CHANGELOG.md

Publish

Publish a new version:

  1. Update CHANGELOG.md and add a new version
  2. Publish with vsce
npm i -g vsce
vsce publish patch

FAQ

How does the extension work?

  • 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

Potential Improvements

  • Use relay-config to support relay.config.json and package.json configurations (legacy)

Inspired by

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.7
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.7
    0

Package Sidebar

Install

npm i relay-watcher

Weekly Downloads

0

Version

0.0.7

License

Apache-2.0

Unpacked Size

103 kB

Total Files

25

Last publish

Collaborators

  • christianv