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
8830b85d
Commit
8830b85d
authored
8 years ago
by
Dan Abramov
Browse files
Options
Download
Email Patches
Plain Diff
Add compile progress indication
parent
d8cf3147
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/start.js
+9
-4
scripts/start.js
with
9 additions
and
4 deletions
+9
-4
scripts/start.js
+
9
-
4
View file @
8830b85d
...
...
@@ -57,14 +57,19 @@ function formatMessage(message) {
.
replace
(
'
./~/css-loader!./~/postcss-loader!
'
,
''
);
}
var
compiler
=
webpack
(
config
,
handleCompile
);
compiler
.
plugin
(
'
done
'
,
function
(
stats
)
{
// Clear the console and reset the cursor
function
clearConsole
()
{
process
.
stdout
.
write
(
'
\
x1B[2J
\
x1B[0f
'
);
}
var
compiler
=
webpack
(
config
,
handleCompile
);
compiler
.
plugin
(
'
invalid
'
,
function
()
{
clearConsole
();
console
.
log
(
'
Compiling...
'
);
});
compiler
.
plugin
(
'
done
'
,
function
(
stats
)
{
clearConsole
();
var
hasErrors
=
stats
.
hasErrors
();
var
hasWarnings
=
stats
.
hasWarnings
();
if
(
!
hasErrors
&&
!
hasWarnings
)
{
console
.
log
(
chalk
.
green
(
'
Compiled successfully!
'
));
console
.
log
();
...
...
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