Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add ROLLUP_WATCH envar to docs #3048

Merged
merged 2 commits into from Aug 12, 2019
Merged

docs: add ROLLUP_WATCH envar to docs #3048

merged 2 commits into from Aug 12, 2019

Conversation

shellscape
Copy link
Contributor

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

Small documentation update to include ROLLUP_WATCH envar. fixes #2711.

@codecov
Copy link

codecov bot commented Aug 11, 2019

Codecov Report

Merging #3048 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3048   +/-   ##
=======================================
  Coverage   88.68%   88.68%           
=======================================
  Files         165      165           
  Lines        5708     5708           
  Branches     1743     1743           
=======================================
  Hits         5062     5062           
  Misses        388      388           
  Partials      258      258

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4adb4c...e670e5e. Read the comment docs.

@shellscape shellscape merged commit 9cd5668 into master Aug 12, 2019
@lukastaegert
Copy link
Member

Alternatively, the ROLLUP_WATCH environment variable may be set to true to enable watch mode

Looking at the code, this is not correct. Instead while in watch mode, Rollup CLI adds the new environment variable, which can be checked by plugins to exhibit different behaviour.

if (command.watch) process.env.ROLLUP_WATCH = 'true';

It can be argued that this is a weird way of doing it and a property on this.meta of the plugin context would be a better place to make this information available but this is how it is implemented. How about

While in watch mode, the ROLLUP_WATCH environment variable will be set to "true" by Rollup's command line interface and can be checked by plugins and other processes.

@lukastaegert lukastaegert deleted the docs/watch-envar branch August 13, 2019 05:40
@shellscape
Copy link
Contributor Author

@lukastaegert that suggestion is good by me. are you OK with me updating master directly with that change?

@lukastaegert
Copy link
Member

Sure, please go ahead!

@shellscape
Copy link
Contributor Author

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ROLLUP_WATCH env variable is missing in the docs
3 participants