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

Updated Readme with Examples #124

Closed
wants to merge 1 commit into from
Closed
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
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,28 @@ OPTIONS:

It will watch the given directories (defaults to the current working directory) with `watchTree` and run the given command every time a file changes.

### Examples

As stated above the pattern is:

watch <command> [...directory] [OPTIONS]

To run the watch command in the terminal you have to write the following:

watch 'npm run test -s' directory

As the command has to be written in quotation marks Windows users may need to use double quotes rather than single quotes

watch "npm run test -s" directory

Note: Because Windows users may need to use double quotes rather than single quotes they need to escape the them in npm scripts

"scripts": {
"watch:osx": "watch 'npm run test -s' source"
"watch:windows": "watch "npm run test -s" source",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, escaping looks like it was missed here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think escaped quotationmarks are just not shown excaped on github!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps they got removed on commit somehow? Do you see them locally?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to check this, I am currently on my phone! Will try to commit again with escaped double quotes and then we'll see whats the issue!
Thx for pointing this out!

Copy link
Collaborator

@levithomason levithomason Mar 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, my first comment was on my phone and I also hesitated at first :P

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it's just not shown in the GUI here!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, I cannot pull the branch as GitHub doesn't know where the repo is:

image

But, if I down the raw file, I get this:

image

I've never seen the unknown repo thing before, but, perhaps it is related. What is clear is that the changes in this PR do not include escaped quotes.

}


## Contributing

### Releasing
Expand Down