Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Commit 5227310

Browse files
author
Will Monk
committed
Update eject script
1 parent a1ef7a0 commit 5227310

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

packages/react-scripts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scripts-ts",
3-
"version": "0.8.5",
3+
"version": "0.8.6",
44
"description": "Configuration and scripts for Create React App.",
55
"repository": "wmonk/create-react-app",
66
"license": "BSD-3-Clause",

packages/react-scripts/scripts/eject.js

+2-13
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ prompt(
8989

9090
var ownPackage = require(path.join(ownPath, 'package.json'));
9191
var appPackage = require(path.join(appPath, 'package.json'));
92-
var babelConfig = JSON.parse(fs.readFileSync(path.join(ownPath, '.babelrc'), 'utf8'));
93-
var eslintConfig = JSON.parse(fs.readFileSync(path.join(ownPath, '.eslintrc'), 'utf8'));
9492

9593
console.log(cyan('Updating the dependencies'));
9694
var ownPackageName = ownPackage.name;
@@ -110,10 +108,10 @@ prompt(
110108
delete appPackage.scripts['eject'];
111109
Object.keys(appPackage.scripts).forEach(function (key) {
112110
appPackage.scripts[key] = appPackage.scripts[key]
113-
.replace(/react-scripts (\w+)/g, 'node scripts/$1.js');
111+
.replace(/react-scripts-ts (\w+)/g, 'node scripts/$1.js');
114112
console.log(
115113
' Replacing ' +
116-
cyan('"react-scripts ' + key + '"') +
114+
cyan('"react-scripts-ts ' + key + '"') +
117115
' with ' +
118116
cyan('"node scripts/' + key + '.js"')
119117
);
@@ -129,15 +127,6 @@ prompt(
129127
true
130128
);
131129

132-
// Add Babel config
133-
134-
console.log(' Adding ' + cyan('Babel') + ' preset');
135-
appPackage.babel = babelConfig;
136-
137-
// Add ESlint config
138-
console.log(' Adding ' + cyan('ESLint') +' configuration');
139-
appPackage.eslintConfig = eslintConfig;
140-
141130
fs.writeFileSync(
142131
path.join(appPath, 'package.json'),
143132
JSON.stringify(appPackage, null, 2)

0 commit comments

Comments
 (0)