Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
a8d29c8c
Commit
a8d29c8c
authored
8 years ago
by
Dan Abramov
Committed by
GitHub
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix usage example to match react-dev-utils@0.2.x API
parent
90e3cc1f
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-dev-utils/README.md
+3
-2
packages/react-dev-utils/README.md
with
3 additions
and
2 deletions
+3
-2
packages/react-dev-utils/README.md
+
3
-
2
View file @
a8d29c8c
...
@@ -110,7 +110,7 @@ clearConsole();
...
@@ -110,7 +110,7 @@ clearConsole();
console
.
log
(
'
Just cleared the screen!
'
);
console
.
log
(
'
Just cleared the screen!
'
);
```
```
#### `formatWebpackMessages(
stats: WebpackStats
): {errors: Array<string>, warnings: Array<string>}`
#### `formatWebpackMessages(
{errors: Array<string>, warnings: Array<string>}
): {errors: Array<string>, warnings: Array<string>}`
Extracts and prettifies warning and error messages from webpack
[
stats
](
https://github.com/webpack/docs/wiki/node.js-api#stats
)
object.
Extracts and prettifies warning and error messages from webpack
[
stats
](
https://github.com/webpack/docs/wiki/node.js-api#stats
)
object.
...
@@ -125,7 +125,8 @@ compiler.plugin('invalid', function() {
...
@@ -125,7 +125,8 @@ compiler.plugin('invalid', function() {
});
});
compiler
.
plugin
(
'
done
'
,
function
(
stats
)
{
compiler
.
plugin
(
'
done
'
,
function
(
stats
)
{
var
messages
=
formatWebpackMessages
(
stats
);
var
rawMessages
=
stats
.
toJson
({},
true
);
var
messages
=
formatWebpackMessages
(
rawMessages
);
if
(
!
messages
.
errors
.
length
&&
!
messages
.
warnings
.
length
)
{
if
(
!
messages
.
errors
.
length
&&
!
messages
.
warnings
.
length
)
{
console
.
log
(
'
Compiled successfully!
'
);
console
.
log
(
'
Compiled successfully!
'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets