Skip to content

Commit c40d031

Browse files
geoffdavis92gaearon
authored andcommittedMar 12, 2017
Suggest "yarn build" rather than "yarn run build" (facebook#1800)
* Fix for issue facebook#1798: Suggested 'yarn build' versus 'yarn run build' * remove 'run' from 'yarn test' command as well * conditionally show 'run' if Yarn is not available
1 parent 33721da commit c40d031

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎scripts/init.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,17 @@ module.exports = function(
149149
console.log(chalk.cyan(` ${displayedCommand} start`));
150150
console.log(' Starts the development server.');
151151
console.log();
152-
console.log(chalk.cyan(` ${displayedCommand} run build`));
152+
console.log(
153+
chalk.cyan(` ${displayedCommand} ${useYarn ? '' : 'run '}build`)
154+
);
153155
console.log(' Bundles the app into static files for production.');
154156
console.log();
155157
console.log(chalk.cyan(` ${displayedCommand} test`));
156158
console.log(' Starts the test runner.');
157159
console.log();
158-
console.log(chalk.cyan(` ${displayedCommand} run eject`));
160+
console.log(
161+
chalk.cyan(` ${displayedCommand} ${useYarn ? '' : 'run '}eject`)
162+
);
159163
console.log(
160164
' Removes this tool and copies build dependencies, configuration files'
161165
);

0 commit comments

Comments
 (0)
Please sign in to comment.