💁♀️ AtJSON has a Code of Conduct that we expect all of our contributors to abide by, please check it out before contributing!
AtJSON is comprised of a bunch of packages, monorepo style. We use 🐉Lerna to manage these dependencies.
💻 To get started, clone atjson onto your computer and navigate into the project.
git clone https://github.com/CondeNast/atjson.git
cd atjson
Ensure that the proper Node.js version is installed (using Node Version Manager):
nvm install
(If you already have the version of Node.js specified in .nvmrc installed, nvm use
can be issued instead.)
Now install the dependencies ✨
npm ci
And run the tests: 👩🔬
npm test
We use 🃏Jest to run our tests, which is ~fantastic~, if you ask us. We recommend looking at Jest's documentation for expectations to get started writing these. If you want to run tests for a specific package, you can do so by navigating to that package and running:
npm test
If you're doing some test driven development, you can continuously run this by running:
npm test -- --watch
And if you've caused some snapshots to become invalid, you can regenerate the snapshots by running:
npm test -- -u
To build the TypeScript into JavaScript for npm
, use lerna
:
lerna run build
You can also run the TypeScript linter to check your code for style issues:
lerna run lint
❤️ Happy Contributing ❤️