Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1 from worldturtlemedia/develop
Browse files Browse the repository at this point in the history
Initial Release
  • Loading branch information
jordond committed May 26, 2019
2 parents e7553f3 + cffc9da commit d333a25
Show file tree
Hide file tree
Showing 27 changed files with 1,233 additions and 166 deletions.
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

22 changes: 11 additions & 11 deletions code-of-conduct.md → CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand Down
103 changes: 103 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Contributing

First of all, thanks for your interest in contributing to the darksky-api! 🎉

PRs are the preferred way to spike ideas and address issues, if you have time. If you plan on contributing frequently, please feel free to ask to become a maintainer; the more the merrier. 🤙

## Technical overview

This library uses following libraries for development:

- [typescript](http://www.typescriptlang.org/) for typed JavaScript and transpilation
- [prettier](https://prettier.io/) for formating the code
- [jest](https://jestjs.io/) for unit testing
- run `yarn test:dev` during development
- [rollup](https://rollupjs.org/guide/en) for creating UMD bundles
- [yarn](https://yarnpkg.com/lang/en/) for package management
- [husky](https://github.com/typicode/husky) for git hooks (pre-commit, pre-push)

### 🧪 Tests

Test are written and run via Jest 💪

```sh
# Run whole test suite once
yarn test
# Run test in watch mode
yarn test:dev
# Lint lib and tests, the run tests with coverage
yarn test:prod
```

### 💅 Style guides

Style guides are enforced by robots _(I meant prettier and tslint of course 🤖 )_, so they'll let you know if you screwed something, but most of the time, they'll autofix things for you. Magic right?

Lint and format codebase via npm-script:

```sh
# Lint and autofix using tslint
yarn lint:all

# Format code with prettier
yarn format
```

#### Commit conventions (via commitizen)

- this is preferred way how to create conventional-changelog valid commits
- if you prefer your custom tool we provide a commit hook linter which will error out, it you provide invalid commit message
- if you are in rush and just wanna skip commit message validation just prefix your message with `WIP: something done` ( if you do this please squash your work when you're done with proper commit message so semantic-release can create Changelog and bump version of your library appropriately )

```sh
# invoke [commitizen CLI](https://github.com/commitizen/cz-cli)
yarn commit
```

### 📖 Documentation

```sh
# Build the docs
yarn docs

# Build the docs and watch for file changes
yarn docs:watch
```

## Getting started

### Creating a Pull Request

If you've never submitted a Pull request before please visit http://makeapullrequest.com/ to learn everything you need to know.

#### Setup

1. Fork the repo.
1. `git clone` your fork.
1. Make a `git checkout -b branch-name` branch for your change.
1. Run `yarn install --ignore-scripts` (make sure you have node and yarn installed first)

Updates

1. Make sure to add unit tests
1. If there is a `*.test.ts` file, update it to include a test for your change, if needed. If this file doesn't exist, please create it.
1. Run `yarn test` or `yarn test:dev` to make sure all tests are working, regardless if a test was added.
1. When your work is done run `yarn test --coverage` to ensure your changes are covered.

---

## 🚀 Publishing

> releases are handled by awesome [semantic-release](https://github.com/semantic-release/semantic-release)
Whenever a commit is pushed to the `master` branch, the CI server will validate the commit, then run `semantic-release`.

If `semantic-release` decides that the commit is worthy of a new release it will:

- bump package version and git tag
- push to github master branch + push tags
- publish build packages to npm

## License

By contributing your code to the darksky-api GitHub Repository, you agree to license your contribution under the MIT license.
Loading

0 comments on commit d333a25

Please sign in to comment.