- 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 [email protected]:[YOUR GITHUB USERNAME]/box-annotations.git
- Navigate to the cloned folder
cd box-annotations
- Add the upstream repo remote
git remote add upstream [email protected]:box/box-annotations.git
- Verify the remotes are properly set up
git remote -v
. You should pull updates from the Box repoupstream
and 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 link
in this repository andyarn link box-annotations
wherever Box Content Preview is cloned locally. - To automatically rsync files after a Webpack build, add a scripts/rsync.json file with a
location
field. 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 build
to generate resource bundles and JS webpack bundlesyarn start
to only generate JS webpack bundles on file changesyarn test
launches Jestyarn test:watch
launches Jest for debugging
For more script commands see package.json
.