mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-05-10 01:25:32 +08:00
Use a single script (#57)
It is easier to add more scripts later this way.
This commit is contained in:
@@ -36,9 +36,9 @@ prompt('Are you sure you want to eject? This action is permanent. [y/N]', functi
|
||||
|
||||
console.log('Ejecting...');
|
||||
console.log();
|
||||
|
||||
var selfPath = path.join(__dirname, '..');
|
||||
var hostPath = path.join(selfPath, '..', '..');
|
||||
|
||||
var files = [
|
||||
path.join('config', 'babel.dev.js'),
|
||||
path.join('config', 'babel.prod.js'),
|
||||
@@ -73,7 +73,6 @@ prompt('Are you sure you want to eject? This action is permanent. [y/N]', functi
|
||||
content = content.replace(/^\/\*\*(\*(?!\/)|[^*])*\*\//, '').trim() + '\n';
|
||||
fs.writeFileSync(path.join(hostPath, file), content);
|
||||
});
|
||||
|
||||
console.log();
|
||||
|
||||
var selfPackage = require(path.join(selfPath, 'package.json'));
|
||||
@@ -109,5 +108,4 @@ prompt('Are you sure you want to eject? This action is permanent. [y/N]', functi
|
||||
console.log('Please consider sharing why you ejected in this survey:');
|
||||
console.log(' http://goo.gl/forms/Bi6CZjk1EqsdelXk1');
|
||||
console.log();
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user