Skip to content

Latest commit

 

History

History
119 lines (74 loc) · 3.73 KB

CONTRIBUTING.md

File metadata and controls

119 lines (74 loc) · 3.73 KB

Contributing to Allen Institute for Cell Science Open Source

Thank you for your interest in contributing to this Allen Institute for Cell Science open source project! This document is a set of guidelines to help you contribute to this project.

Code of Conduct

By participating in this project, you are expected to uphold our Code of Conduct.

Project Documentation

The README in the root of the repository should contain or link to project documentation. If you cannot find the documentation you're looking for, please file a GitHub issue with details of what you'd like to see documented.


How to Contribute

  1. Fork the repo on GitHub.
  2. Create a branch and make your edits on your branch, pushing back to your fork.
  3. Make sure npm run typeCheck, npm run test and npm run lint all exit without errors. Add tests and documentation as needed.
  4. Submit a pull request back to the main branch via GitHub.

Install dependencies

Only required on the first run, subsequent runs can use yarn to both bootstrap and run the development server using yarn develop. Since this starter using the netlify-dev, there could be further issues you, please check the netlify-dev repository for further information and set up questions.

Available scripts

build

Build the static files into the public folder, turns lambda functions into a deployable form.

Usage

$ yarn build

clean

Runs gatsby clean command.

Usage

yarn clean

Access Locally

Pulldown a local copy of the Github repository Netlify created for you, with the name you specified in the previous step

$ git clone https://github.com/[GITHUB_USERNAME]/[REPO_NAME].git
$ cd [REPO_NAME]
$ yarn
$ netlify dev # or npm start

Getting Started (Without Netlify)

$ npm start

Setting up the CMS

Follow the Decap CMS Quick Start Guide to set up authentication, and hosting for production.

If you want use Decap CMS locally, run the site in one terminal with npm run start and in another Terminal you can use npx netlify-cms-proxy-server which proxy requests so you'll be automatically logged in as a user on http:localhost:3000/admin.

Deployment

Staging

The main branch is auto deployed at the staging site.

Production deployment

  1. Make a new version: npm version [patch/minor/major]
  2. Push the new package.json version: git push origin main
  3. Push the new tag: git push origin [NEW_TAG]
  4. Go to the production site and write the release notes for the new version.

Debugging

Windows users, who aren't using WSL, might encounter node-gyp errors when trying to npm install. To resolve, make sure that you have both Python 2.7 and the Visual C++ build environment installed.

npm config set python python2.7
npm install --global --production windows-build-tools

Full details here.

MacOS and WSL users who might also encounter some errors, check node-gyp for more info. We recommend using the latest stable node version.

Purgecss

This plugin uses gatsby-plugin-purgecss.

License

By contributing to the Gatsby - Netlify CMS starter, you agree that your contributions will be licensed under its MIT license.