Skip to content

Latest commit

 

History

History
99 lines (65 loc) · 3.02 KB

CONTRIBUTING.md

File metadata and controls

99 lines (65 loc) · 3.02 KB

Contributing Guidelines

Pull requests & contributions welcome! This document outlines the steps you need to take to develop this package locally and contribute changes. This project was bootstrapped with TSDX.

The Five Golden Rules

The simple steps of contributing to any GitHub project are as follows:

  1. Fork the repository
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push -u origin my-new-feature
  5. Create a Pull Request!

To keep your fork of in sync with this repository, follow this guide.

Prerequisites

Windows, macOS and Linux

Prerequisite Check

Run these commands inside the Terminal (PowerShell/Command Prompt for Windows).

Git: You should see the version number:

$ git version
git version 2.18.0

Node.js: You should see the version number:

$ node -v
v10.16.0

Yarn: You should see the version number:

$ yarn -v
1.16.0

Setting Up

First, you should clone the repository.

$ git clone https://github.com/pinjhollist/next-with-analytics.git
Cloning into 'next-with-analytics'...
remote: Enumerating objects: 61, done.
remote: Counting objects: 100% (61/61), done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 61 (delta 22), reused 51 (delta 13), pack-reused 0
Unpacking objects: 100% (61/61), done.

After these repository has been cloned, cd into the repository:

$ cd next-with-analytics

Install the project's dependencies. Note that we use Yarn, not npm:

$ yarn

Local Development

Below is a list of commands you will probably find useful.

npm start or yarn start

Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.

Your library will be rebuilt if you make edits.

npm run build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

npm test or yarn test

Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.