sbalay / react-bootstrap

Repository from Github https://github.comsbalay/react-bootstrapRepository from Github https://github.comsbalay/react-bootstrap

wolox-react-bootstrap

This script aims to automate the process of initializing a React App using the Wolox standards.

Prerequisites

How to use

To run from server:

You don't need to clone this repository. Just follow these steps:

Run the installation script using the following command:

bash <(curl -s https://raw.githubusercontent.com/Wolox/react-bootstrap/development/run.sh)

Optional parameters:

  • -v or --verbose: Display more information as the bootstrap is running
  • -l or --local: Run a local version of the bootstrap

Run locally

To setup a local version of the bootstrap, you may clone it and do the following:

cd ./react-bootstrap
npm link

After that, every time you want to run it you may execute the run script: with the local flag

# Make sure you are in the parent folder of the bootstrap
./react-bootstrap/run.sh -l

Notes

This script will configure your system to install global npm packages without having to use sudo.

Known Issues

Yeoman not found during project generation

Sometimes when running the generator, you will get an error indicating that yeoman is not installed and a prompt with a message like: -bash: yo: command not found. We've found that this is sometimes caused by not having the node modules binaries route correctly configured.

The easiest way to fix it is by adding this line to the end of your ~/.bashrc, ~/.zshrc or the configuration script for your shell:

  • export PATH=/usr/local/share/npm/bin:$PATH

If the above does not work, another possible way to fix it is the following:

  • Uninstall yeoman: sudo npm remove -g yo
  • Manually set your node path: sudo npm config set prefix $NVM_DIR/versions/node/$(node--version)
  • export the NODE_PATH variable: export NODE_PATH=$NVM_DIR/versions/node/$(node --version)/lib/node_modules
  • Reinstall it: npm install -g yo

WARNING: If you accidentaly save wrong paths here you might break npm/node. If you do, try to set the prefix again, manually inserting your node version. If doesn't work you may need to uninstall node and npm, reinstall them and start over.

About


Languages

Language:JavaScript 73.0%Language:HTML 7.9%Language:CSS 6.8%Language:Shell 6.6%Language:TypeScript 5.5%Language:Dockerfile 0.2%Language:Groovy 0.1%