Commit 7b881f12 authored by Ade Viankakrisna Fadlil's avatar Ade Viankakrisna Fadlil Committed by Dan Abramov
Browse files

move the link for deployment to the bottom (#3736)

parent 7fd37d35
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 36 additions and 38 deletions
+36 -38
...@@ -26,11 +26,9 @@ function printHostingInstructions( ...@@ -26,11 +26,9 @@ function printHostingInstructions(
printBaseMessage(buildFolder, publicPathname); printBaseMessage(buildFolder, publicPathname);
printDeployInstructions(publicUrl, hasDeployScript, useYarn); printDeployInstructions(publicUrl, hasDeployScript, useYarn);
} else if (publicPath !== '/') { } else if (publicPath !== '/') {
// "homepage": "http://mywebsite.com/project" // "homepage": "http://mywebsite.com/project"
printBaseMessage(buildFolder, publicPath); printBaseMessage(buildFolder, publicPath);
} else { } else {
// "homepage": "http://mywebsite.com" // "homepage": "http://mywebsite.com"
// or no homepage // or no homepage
...@@ -39,40 +37,36 @@ function printHostingInstructions( ...@@ -39,40 +37,36 @@ function printHostingInstructions(
printStaticServerInstructions(buildFolder, useYarn); printStaticServerInstructions(buildFolder, useYarn);
} }
console.log(); console.log();
console.log('Find out more about deployment here:');
console.log();
console.log(` ${chalk.yellow('http://bit.ly/2vY88Kr')}`);
console.log();
} }
function printBaseMessage(buildFolder, hostingLocation) { function printBaseMessage(buildFolder, hostingLocation) {
console.log( console.log(
`The project was built assuming it is hosted at ${chalk.green( `The project was built assuming it is hosted at ${chalk.green(
hostingLocation || 'the server root' hostingLocation || 'the server root'
)}.` )}.`
); );
console.log( console.log(
`You can control this with the ${chalk.green( `You can control this with the ${chalk.green(
'homepage' 'homepage'
)} field in your ${chalk.cyan('package.json')}.` )} field in your ${chalk.cyan('package.json')}.`
); );
if (!hostingLocation) { if (!hostingLocation) {
console.log('For example, add this to build it for GitHub Pages:'); console.log('For example, add this to build it for GitHub Pages:');
console.log();
console.log(
` ${chalk.green('"homepage"')} ${chalk.cyan(':')} ${chalk.green(
'"http://myname.github.io/myapp"'
)}${chalk.cyan(',')}`
);
}
console.log(); console.log();
console.log( console.log(
`The ${chalk.cyan(buildFolder)} folder is ready to be deployed.` ` ${chalk.green('"homepage"')} ${chalk.cyan(':')} ${chalk.green(
'"http://myname.github.io/myapp"'
)}${chalk.cyan(',')}`
); );
console.log() }
console.log('Find out more about deployment here:'); console.log();
console.log(); console.log(`The ${chalk.cyan(buildFolder)} folder is ready to be deployed.`);
console.log(` ${chalk.yellow('http://bit.ly/2vY88Kr')}`);
console.log();
} }
function printDeployInstructions(publicUrl, hasDeployScript, useYarn) { function printDeployInstructions(publicUrl, hasDeployScript, useYarn) {
...@@ -88,20 +82,24 @@ function printDeployInstructions(publicUrl, hasDeployScript, useYarn) { ...@@ -88,20 +82,24 @@ function printDeployInstructions(publicUrl, hasDeployScript, useYarn) {
} }
console.log(); console.log();
console.log(`Add the following script in your ${chalk.cyan( console.log(
'package.json' `Add the following script in your ${chalk.cyan('package.json')}.`
)}.`); );
console.log(); console.log();
console.log(` ${chalk.dim('// ...')}`); console.log(` ${chalk.dim('// ...')}`);
console.log(` ${chalk.yellow('"scripts"')}: {`); console.log(` ${chalk.yellow('"scripts"')}: {`);
console.log(` ${chalk.dim('// ...')}`); console.log(` ${chalk.dim('// ...')}`);
console.log(` ${chalk.yellow('"predeploy"')}: ${chalk.yellow( console.log(
'"npm run build",' ` ${chalk.yellow('"predeploy"')}: ${chalk.yellow(
)}`); '"npm run build",'
console.log(` ${chalk.yellow('"deploy"')}: ${chalk.yellow( )}`
'"gh-pages -d build"' );
)}`); console.log(
` ${chalk.yellow('"deploy"')}: ${chalk.yellow(
'"gh-pages -d build"'
)}`
);
console.log(' }'); console.log(' }');
console.log(); console.log();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment