Skip to content

Commit 6e7e1d4

Browse files
lpalmesSpaceK33z
authored andcommittedMar 7, 2017
Display yarn instead of yarnpkg when creating a new app (facebook#1747)
* Display yarn instead of yarnpkg * Refactored displayd commands * Removed testing directory
1 parent 1696773 commit 6e7e1d4

File tree

1 file changed

+8
-5
lines changed
  • packages/react-cy-scripts/scripts

1 file changed

+8
-5
lines changed
 

‎packages/react-cy-scripts/scripts/init.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -116,27 +116,30 @@ module.exports = function(appPath, appName, verbose, originalDirectory, template
116116
cdpath = appPath;
117117
}
118118

119+
// Change displayed command to yarn instead of yarnpkg
120+
var displayedCommand = useYarn ? 'yarn' : 'npm';
121+
119122
console.log();
120123
console.log('Success! Created ' + appName + ' at ' + appPath);
121124
console.log('Inside that directory, you can run several commands:');
122125
console.log();
123-
console.log(chalk.cyan(' ' + command + ' start'));
126+
console.log(chalk.cyan(' ' + displayedCommand + ' start'));
124127
console.log(' Starts the development server.');
125128
console.log();
126-
console.log(chalk.cyan(' ' + command + ' run build'));
129+
console.log(chalk.cyan(' ' + displayedCommand + ' run build'));
127130
console.log(' Bundles the app into static files for production.');
128131
console.log();
129-
console.log(chalk.cyan(' ' + command + ' test'));
132+
console.log(chalk.cyan(' ' + displayedCommand + ' test'));
130133
console.log(' Starts the test runner.');
131134
console.log();
132-
console.log(chalk.cyan(' ' + command + ' run eject'));
135+
console.log(chalk.cyan(' ' + displayedCommand + ' run eject'));
133136
console.log(' Removes this tool and copies build dependencies, configuration files');
134137
console.log(' and scripts into the app directory. If you do this, you can’t go back!');
135138
console.log();
136139
console.log('We suggest that you begin by typing:');
137140
console.log();
138141
console.log(chalk.cyan(' cd'), cdpath);
139-
console.log(' ' + chalk.cyan(command + ' start'));
142+
console.log(' ' + chalk.cyan(displayedCommand + ' start'));
140143
if (readmeExists) {
141144
console.log();
142145
console.log(chalk.yellow('You had a `README.md` file, we renamed it to `README.old.md`'));

0 commit comments

Comments
 (0)