Skip to content

Commit

Permalink
Merge pull request #22 from sharetribe/hosting-instructions
Browse files Browse the repository at this point in the history
Override hosting instructions with FTW specific
  • Loading branch information
rap1ds authored Aug 4, 2021
2 parents 9d925dd + dd207af commit 2d61a9d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/react-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ which version of `react-scripts` this fork is built from.
- Use [postcss-import](https://github.com/postcss/postcss-import)
- Use [postcss-apply](https://github.com/pascalduez/postcss-apply)
- A separate `build-server` script that makes a build to use in SSR (server side rendering)
- Show customized instructions how to run the production build bundle

## Development

Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sharetribe-scripts",
"version": "5.0.0",
"version": "5.0.1",
"description": "Fork of facebookincubator/[email protected] with some additional features.",
"repository": {
"type": "git",
Expand Down
45 changes: 44 additions & 1 deletion packages/react-scripts/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,50 @@ const configFactory = require('../config/webpack.config');
const paths = require('../config/paths');
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
const printHostingInstructions = require('react-dev-utils/printHostingInstructions');

//
// Sharetribe custom: override the default hosting instructions with FTW specific instructions.
//
// const printHostingInstructions = require('react-dev-utils/printHostingInstructions');
//
function printHostingInstructions(
appPackage,
publicUrl,
publicPath,
buildFolder,
useYarn
) {
console.log();
console.log(`The ${chalk.cyan(buildFolder)} folder is ready to be deployed.`);
console.log();
console.log(
'In local development machine you may serve it on production mode by running:'
);
console.log();
console.log(` NODE_ENV=production PORT=3000 ${chalk.cyan('yarn')} start`);
console.log();
console.log(
'In production server (e.g. Heroku) we recommend you to set the environment'
);
console.log(
`variables ${chalk.cyan('NODE_ENV')} and ${chalk.cyan(
'PORT'
)} using provider\'s own mechanism to manage`
);
console.log('environment variables, and then start the app by running:');
console.log();
console.log(` ${chalk.cyan('yarn')} start`);
console.log();
console.log('Find out more about environment variables and deployment here:');
console.log();
console.log(
` ${chalk.yellow(
'https://www.sharetribe.com/docs/ftw-hosting/how-to-deploy-ftw-to-production/'
)}`
);
console.log();
}

const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
const printBuildError = require('react-dev-utils/printBuildError');

Expand Down

0 comments on commit 2d61a9d

Please sign in to comment.