Fix workflow if react-scripts package is linked via npm-link (#1356)

* add npm-link support

* - remove extra veriable
- simplify condition

* update code after review:
- remove utils/isReactScriptsLinked
- add appPath and ownPath to paths.js (but only for "before eject" export case)

* update code after review:
- remove utils/isReactScriptsLinked
- add appPath and ownPath to paths.js (but only for "before eject" export case)

* update code after review:
- remove utils/isReactScriptsLinked
- add appPath and ownPath to paths.js (but only for "before eject" export case)
- remove "if" block for fs.removeSync(ownPath) at ejec.tjs

* change ownPath value
This commit is contained in:
Valerii Sorokobatko
2017-02-24 18:51:16 +02:00
committed by Joe Haddad
parent 67d0d49ac5
commit bec009ce71
2 changed files with 24 additions and 18 deletions

View File

@@ -28,8 +28,8 @@ prompt(
console.log('Ejecting...');
var ownPath = path.join(__dirname, '..');
var appPath = path.join(ownPath, '..', '..');
var ownPath = paths.ownPath;
var appPath = paths.appPath;
function verifyAbsent(file) {
if (fs.existsSync(path.join(appPath, file))) {
@@ -135,7 +135,6 @@ prompt(
);
// Add Babel config
console.log(' Adding ' + cyan('Babel') + ' preset');
appPackage.babel = babelConfig;