Skip to content

Commit

Permalink
s/create-react-app-scripts/react-scripts/
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeux committed Jul 18, 2016
1 parent bcbf63f commit 862900d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions global-cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ var argv = require('minimist')(process.argv.slice(2));
* --scripts-version <alternative package>
* Example of valid values:
* - a specific npm version: "0.22.0-rc1"
* - a .tgz archive from any npm repo: "https://registry.npmjs.org/create-react-app-scripts/-/create-react-app-scripts-0.20.0.tgz"
* - a package prepared with `npm pack`: "/Users/home/vjeux/create-react-app/create-react-app-scripts-0.22.0.tgz"
* - a .tgz archive from any npm repo: "https://registry.npmjs.org/react-scripts/-/react-scripts-0.20.0.tgz"
* - a package prepared with `npm pack`: "/Users/home/vjeux/create-react-app/react-scripts-0.22.0.tgz"
*/
var commands = argv._;
if (commands.length === 0) {
Expand Down Expand Up @@ -91,7 +91,7 @@ function createApp(name, verbose, version) {
fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify(packageJson));
process.chdir(root);

console.log('Installing create-react-app-scripts package from npm...');
console.log('Installing react-scripts package from npm...');
console.log('This might take a while! ⌛');
console.log();

Expand All @@ -116,7 +116,7 @@ function run(root, appName, version, verbose) {
var scriptsPath = path.resolve(
process.cwd(),
'node_modules',
'create-react-app-scripts',
'react-scripts',
'scripts',
'init.js'
);
Expand All @@ -126,7 +126,7 @@ function run(root, appName, version, verbose) {
}

function getInstallPackage(version) {
var packageToInstall = 'create-react-app-scripts';
var packageToInstall = 'react-scripts';
var validSemver = semver.valid(version);
if (validSemver) {
packageToInstall += '@' + validSemver;
Expand All @@ -141,7 +141,7 @@ function checkNodeVersion() {
var packageJsonPath = path.resolve(
process.cwd(),
'node_modules',
'create-react-app-scripts',
'react-scripts',
'package.json'
);
var packageJson = require(packageJsonPath);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "create-react-app-scripts",
"name": "react-scripts",
"version": "0.0.1",
"scripts": {
"start": "node scripts/start.js",
Expand Down
4 changes: 2 additions & 2 deletions scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ prompt('Are you sure you want to eject? This action is permanent. [y/N]', functi
var selfPackage = require(path.join(selfPath, 'package.json'));
var hostPackage = require(path.join(hostPath, 'package.json'));

console.log('Removing dependency: create-react-app-scripts');
delete hostPackage.devDependencies['create-react-app-scripts'];
console.log('Removing dependency: react-scripts');
delete hostPackage.devDependencies['react-scripts'];

Object.keys(selfPackage.dependencies).forEach(function (key) {
console.log('Adding dependency: ' + key);
Expand Down
2 changes: 1 addition & 1 deletion scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var path = require('path');
var spawn = require('cross-spawn');

module.exports = function(hostPath, appName, verbose) {
var selfPath = path.join(hostPath, 'node_modules', 'create-react-app-scripts');
var selfPath = path.join(hostPath, 'node_modules', 'react-scripts');

var hostPackage = require(path.join(hostPath, 'package.json'));
var selfPackage = require(path.join(selfPath, 'package.json'));
Expand Down

0 comments on commit 862900d

Please sign in to comment.