# Nested Archetype
This archetype includes common tools used to build JS (not necessarily React) applications.

To start a new project using this archetype:
1. Create a project with `git` and run through `npm init`.
1. Run `yarn add builder nested-archetype`.
1. Run `yarn add -D nested-archetype-dev`.
1. Create a `.babelrc` file with
    ```js
    {
      "extends": "./node_modules/nested-archetype-dev/.babelrc"
    }

    ```
1. Create a `.builderrc` file with
    ```yml
    ---
    archetypes:
      - nested-archetype
    ```
1. Create a `.eslintrc.js` file with
    ```js
    module.exports = {
      extends: './node_modules/nested-archetype-dev/.eslintrc.js',
    };
    ```

###### Notes
If you haven't done this before, you will need to augment your `PATH` variable to be able to use the local version of builder following [these instructions](https://github.com/FormidableLabs/builder#path-augmentation). If you add this to your `.bash_profile`

This package was built using [`builder`](https://github.com/FormidableLabs/builder).

You can override all of the commands in your local package.

## Available commands
All of the commands need to be preceded by `builder run`. **Pro tip:** add an alias `b` for `builder run` command.

- `check` - runs the linter and tests.
- `lint` - runs the linter.
- `test` - runs all of the tests concurrently. The amount of tests running at the same time defaults to the number of the cores available on your machine.
- `test:single` - runs all of the tests consecutively (one by one).
- `test:watch` - watches all tests.

## Extending Jest configuration
You can extend Jest configuration by creating a `jest.config.js` file and adding a preset option.
```js
module.exports = {
  preset: 'nested-archetype-dev',
  ...your configuration
};
```
