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

Commit 44b37dd

Browse files
author
Kent C. Dodds
authored
fix(docs): add malware warning to README
Also add codesponsor to README
1 parent c03ec7a commit 44b37dd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Run scripts that set and use environment variables across platforms
2222
[![Star on GitHub][github-star-badge]][github-star]
2323
[![Tweet][twitter-badge]][twitter]
2424

25+
[![Sponsor](https://app.codesponsor.io/embed/PKGFLnhDiFvsUA5P4kAXfiPs/kentcdodds/cross-env.svg)](https://app.codesponsor.io/link/PKGFLnhDiFvsUA5P4kAXfiPs/kentcdodds/cross-env)
26+
2527
## The problem
2628

2729
Most Windows command prompts will choke when you set environment variables with
@@ -46,6 +48,9 @@ should be installed as one of your project's `devDependencies`:
4648
npm install --save-dev cross-env
4749
```
4850

51+
> WARNING! Make sure that when you're installing packages that you spell things
52+
> correctly to avoid [mistakenly installing malware][malware]
53+
4954
## Usage
5055

5156
I use this in my npm scripts:
@@ -86,13 +91,15 @@ env variables or when the environment variables are too long to have everything
8691
in one line.
8792

8893
Lastly, if you want to pass a JSON string (e.g., when using [ts-loader]), you can do as follows:
94+
8995
```json
9096
{
9197
"scripts": {
9298
"test": "cross-env TS_NODE_COMPILER_OPTIONS={\\\"module\\\":\\\"commonjs\\\"} node some_file.test.ts"
9399
}
94100
}
95101
```
102+
96103
Pay special attention to the **triple backslash** `(\\\)` **before** the **double quotes** `(")` and the **absence** of **single quotes** `(')`.
97104
Both of these conditions have to be met in order to work both on Windows and UNIX.
98105

@@ -191,3 +198,4 @@ MIT
191198
[angular-formly]: https://github.com/formly-js/angular-formly
192199
[cross-spawn]: https://www.npmjs.com/package/cross-spawn
193200
[ts-loader]: https://www.npmjs.com/package/ts-loader
201+
[malware]: http://blog.npmjs.org/post/163723642530/crossenv-malware-on-the-npm-registry

0 commit comments

Comments
 (0)