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
024b4d4f
Commit
024b4d4f
authored
8 years ago
by
Dan Abramov
Browse files
Options
Download
Email Patches
Plain Diff
Minor tweaks
parent
c7bc89ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/webpack.config.dev.js
+4
-5
config/webpack.config.dev.js
scripts/start.js
+4
-5
scripts/start.js
with
8 additions
and
10 deletions
+8
-10
config/webpack.config.dev.js
+
4
-
5
View file @
024b4d4f
...
@@ -12,16 +12,15 @@ var autoprefixer = require('autoprefixer');
...
@@ -12,16 +12,15 @@ var autoprefixer = require('autoprefixer');
var
webpack
=
require
(
'
webpack
'
);
var
webpack
=
require
(
'
webpack
'
);
var
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
);
var
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
);
function
isInDebugMode
()
{
return
process
.
argv
.
some
(
function
(
item
)
{
return
item
.
indexOf
(
'
--debug-template
'
)
>
-
1
});
}
// TODO: hide this behind a flag and eliminate dead code on eject.
// TODO: hide this behind a flag and eliminate dead code on eject.
// This shouldn't be exposed to the user.
// This shouldn't be exposed to the user.
var
isInNodeModules
=
'
node_modules
'
===
var
isInNodeModules
=
'
node_modules
'
===
path
.
basename
(
path
.
resolve
(
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
)));
path
.
basename
(
path
.
resolve
(
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
)));
var
relativePath
=
isInNodeModules
?
'
../../..
'
:
'
..
'
;
var
relativePath
=
isInNodeModules
?
'
../../..
'
:
'
..
'
;
if
(
isInDebugMode
())
{
var
isInDebugMode
=
process
.
argv
.
some
(
arg
=>
arg
.
indexOf
(
'
--debug-template
'
)
>
-
1
);
if
(
isInDebugMode
)
{
relativePath
=
'
../template
'
;
relativePath
=
'
../template
'
;
}
}
var
srcPath
=
path
.
resolve
(
__dirname
,
relativePath
,
'
src
'
);
var
srcPath
=
path
.
resolve
(
__dirname
,
relativePath
,
'
src
'
);
...
...
This diff is collapsed.
Click to expand it.
scripts/start.js
+
4
-
5
View file @
024b4d4f
...
@@ -17,14 +17,13 @@ var config = require('../config/webpack.config.dev');
...
@@ -17,14 +17,13 @@ var config = require('../config/webpack.config.dev');
var
execSync
=
require
(
'
child_process
'
).
execSync
;
var
execSync
=
require
(
'
child_process
'
).
execSync
;
var
opn
=
require
(
'
opn
'
);
var
opn
=
require
(
'
opn
'
);
function
isSmokeTest
()
{
return
process
.
argv
.
some
(
function
(
item
)
{
return
item
.
indexOf
(
'
--smoke-test
'
)
>
-
1
});
}
// TODO: hide this behind a flag and eliminate dead code on eject.
// TODO: hide this behind a flag and eliminate dead code on eject.
// This shouldn't be exposed to the user.
// This shouldn't be exposed to the user.
var
handleCompile
;
var
handleCompile
;
if
(
isSmokeTest
())
{
var
isSmokeTest
=
process
.
argv
.
some
(
arg
=>
arg
.
indexOf
(
'
--smoke-test
'
)
>
-
1
);
if
(
isSmokeTest
)
{
handleCompile
=
function
(
err
,
stats
)
{
handleCompile
=
function
(
err
,
stats
)
{
if
(
err
||
stats
.
hasErrors
()
||
stats
.
hasWarnings
())
{
if
(
err
||
stats
.
hasErrors
()
||
stats
.
hasWarnings
())
{
process
.
exit
(
1
);
process
.
exit
(
1
);
...
...
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