- Install latest LTS version of Node
https://nodejs.org/en/download - Install yarn package manager
https://yarnpkg.com/en/docs/install - Fork the upstream repo
https://github.com/box/box-annotations - Clone the fork locally
git clone git@github.com:[YOUR GITHUB USERNAME]/box-annotations.git - Navigate to the cloned folder
cd box-annotations - Add the upstream repo remote
git remote add upstream git@github.com:box/box-annotations.git - Verify the remotes are properly set up
git remote -v. You should pull updates from the Box repoupstreamand push changes to your forkorigin. - Install dependencies
yarn install - Test your first build!
yarn build - To link and test your local code changes along with your local Preview changes, run
yarn linkin this repository andyarn link box-annotationswherever Box Content Preview is cloned locally. - To automatically rsync files after a Webpack build, add a scripts/rsync.json file with a
locationfield. This file should look like:
{
"location": "YOUR_DESIRED_RSYNC_LOCATION_HERE"
}
Install the following plugins in your preferred editor
- Editor Config (standardizes basic editor configuration)
- ESLint (Javascript linting)
- Prettier & Prettier - ESLint (Automatic Javascript formatting following ESLint config)
- Stylelint (CSS linting)
yarn buildto generate resource bundles and JS webpack bundlesyarn startto only generate JS webpack bundles on file changesyarn testlaunches Jestyarn test:watchlaunches Jest for debugging
For more script commands see package.json.