Skip to content

Latest commit

 

History

History
64 lines (41 loc) · 2.11 KB

CONTRIBUTING.md

File metadata and controls

64 lines (41 loc) · 2.11 KB

How to Contribute to Backpack

Table of Contents

Getting started

First fork the project to your GitHub account. Then clone it, checkout a new branch, and install the dependencies.

git clone https://github.com/YOUR_USERNAME/backpack.git
cd backpack
git checkout -B YOUR_BRANCH_NAME
npm install

Backpack is a monorepo powered by Lerna. After you install, Lerna will run its bootstrap command that will install all dependencies in each of the packages and examples folders, build each example, and symlink all interdependencies.

Now you can run all of the examples with your local version of Backpack. When you make edits to anything in packages, you (will probably) need to restart the example you are working with to pick up changes. Imagine the following workflow:

In one terminal tab, I open and run the basic example:

cd examples/basic
npm run dev

Next, I open up packages/backpack-core/webpack.config.js in my editor and make some changes to the webpack configuration focusing on development mode.

To try out these local changes, I would need to:

  • Kill the running example (i.e. CMD + c)
  • Rerun it to pickup changes (i.e. npm run dev)

That's it.

Using Lerna

When moving between branches, it's a good idea to work with a fresh install.

In your project's root run the following:

./node_modules/bin/lerna clean
./node_modules/bin/lerna bootstrap

This will clean out, reinstall, rebuild, and symlink all of the examples and packages properly.

Support