Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.

Commit

Permalink
docs(readme): add gotchas
Browse files Browse the repository at this point in the history
Add Gotchas paragraph about passing variables to multiple scripts.
  • Loading branch information
Hugo Wood committed Mar 15, 2017
1 parent 390baad commit 4f01656
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@ the parent. This is quite useful for launching the same command with different
env variables or when the environment variables are too long to have everything
in one line.

## Gotchas

If you want to have the environment variable apply to several commands in series
then you will need to wrap those in quotes in your script. For example:

```json
{
"scripts": {
"greet": "cross-env GREETING=Hi NAME=Joe \"echo $GREETING && echo $NAME\""
}
}
```

## Inspiration

I originally created this to solve a problem I was having with my npm scripts in
Expand Down

0 comments on commit 4f01656

Please sign in to comment.