-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Tweak environment handling * Add documentation for getCacheIdentifier
- Loading branch information
Showing
2 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
This package includes some utilities used by [Create React App](https://github.com/facebook/create-react-app).<br> | ||
Please refer to its documentation: | ||
|
||
* [Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app. | ||
* [User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App. | ||
- [Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app. | ||
- [User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App. | ||
|
||
## Usage in Create React App Projects | ||
|
||
|
@@ -361,3 +361,13 @@ module: { | |
]; | ||
} | ||
``` | ||
|
||
#### `getCacheIdentifier(environment: string, packages: string[]): string` | ||
|
||
Returns a cache identifier (string) consisting of the specified environment and related package versions, e.g., | ||
|
||
```js | ||
var getCacheIdentifier = require('react-dev-utils/getCacheIdentifier'); | ||
|
||
getCacheIdentifier('prod', ['react-dev-utils', 'chalk']); // # => 'prod:[email protected]:[email protected]' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters