Skip to content
GitLab
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
279d704f
Commit
279d704f
authored
8 years ago
by
Christopher Chedeau
Browse files
Options
Download
Email Patches
Plain Diff
.
Summary: Test Plan: Reviewers: CC: Task ID: #
parent
b29572ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/start.js
+8
-0
scripts/start.js
with
8 additions
and
0 deletions
+8
-0
scripts/start.js
+
8
-
0
View file @
279d704f
...
@@ -12,6 +12,7 @@ process.env.NODE_ENV = 'development';
...
@@ -12,6 +12,7 @@ process.env.NODE_ENV = 'development';
var
webpack
=
require
(
'
webpack
'
);
var
webpack
=
require
(
'
webpack
'
);
var
WebpackDevServer
=
require
(
'
webpack-dev-server
'
);
var
WebpackDevServer
=
require
(
'
webpack-dev-server
'
);
var
config
=
require
(
'
../webpack.config.dev
'
);
var
config
=
require
(
'
../webpack.config.dev
'
);
var
execSync
=
require
(
'
child_process
'
).
execSync
;
new
WebpackDevServer
(
webpack
(
config
),
{
new
WebpackDevServer
(
webpack
(
config
),
{
publicPath
:
config
.
output
.
publicPath
,
publicPath
:
config
.
output
.
publicPath
,
...
@@ -37,4 +38,11 @@ new WebpackDevServer(webpack(config), {
...
@@ -37,4 +38,11 @@ new WebpackDevServer(webpack(config), {
return
console
.
log
(
err
);
return
console
.
log
(
err
);
}
}
console
.
log
(
'
Listening at http://localhost:3000/
'
);
console
.
log
(
'
Listening at http://localhost:3000/
'
);
try
{
execSync
(
'
ps cax | grep "Google Chrome"
'
);
execSync
(
'
open -a "Google Chrome" http://localhost:3000/
'
);
}
catch
(
e
)
{
// Do nothing if Chrome cannot be opened
}
});
});
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