Skip to content

Commit 448d91d

Browse files
Update according to Contributors library guidelines (#48)
1 parent 2b81ce1 commit 448d91d

19 files changed

+208
-155
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.github/CONTRIBUTING.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Contributing to Argonaut
2+
3+
Thanks for your interest in contributing to `argonaut`! We welcome new contributions regardless of your level of experience or familiarity with PureScript.
4+
5+
Every library in the Contributors organization shares a simple handbook that helps new contributors get started. With that in mind, please [read the short contributing guide on purescript-contrib/governance](https://github.com/purescript-contrib/governance/blob/main/contributing.md) before contributing to this library.

.github/ISSUE_TEMPLATE/bug-report.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Bug report
3+
about: Report an issue
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of the bug.
11+
12+
**To Reproduce**
13+
A minimal code example (preferably a runnable example on [Try PureScript](https://try.purescript.org)!) or steps to reproduce the issue.
14+
15+
**Expected behavior**
16+
A clear and concise description of what you expected to happen.
17+
18+
**Additional context**
19+
Add any other context about the problem here.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Change request
3+
about: Propose an improvement to this library
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Is your change request related to a problem? Please describe.**
10+
A clear and concise description of the problem.
11+
12+
Examples:
13+
14+
- It's frustrating to have to [...]
15+
- I was looking for a function to [...]
16+
17+
**Describe the solution you'd like**
18+
A clear and concise description of what a good solution to you looks like, including any solutions you've already considered.
19+
20+
**Additional context**
21+
Add any other context about the change request here.

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: PureScript Discourse
4+
url: https://discourse.purescript.org/
5+
about: Ask and answer questions here.
6+
- name: Functional Programming Slack
7+
url: https://functionalprogramming.slack.com
8+
about: For casual chat and questions (use https://fpchat-invite.herokuapp.com to join).

.github/PULL_REQUEST_TEMPLATE.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
**Description of the change**
2+
Clearly and concisely describe the purpose of the pull request. If this PR relates to an existing issue or change proposal, please link to it. Include any other background context that would help reviewers understand the motivation for this PR.
3+
4+
---
5+
6+
**Checklist:**
7+
8+
- [ ] Added the change to the changelog's "Unreleased" section with a link to this PR and your username
9+
- [ ] Linked any existing issues or proposals that this pull request should close
10+
- [ ] Updated or added relevant documentation in the README and/or documentation directory
11+
- [ ] Added a test for the contribution (if applicable)

.github/contributing.md

-51
This file was deleted.

.github/issue_template.md

-21
This file was deleted.

.github/pull_request_template.md

-15
This file was deleted.

.github/workflows/ci.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up a PureScript toolchain
17+
uses: purescript-contrib/setup-purescript@main
18+
19+
- name: Cache PureScript dependencies
20+
uses: actions/cache@v2
21+
with:
22+
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
23+
path: |
24+
.spago
25+
output
26+
27+
- name: Install dependencies
28+
run: spago install
29+
30+
- name: Build source
31+
run: spago build --no-install --purs-args '--censor-lib --strict'
32+
33+
- name: Run tests
34+
run: spago test --no-install

.github/workflows/stale.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Stale"
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/stale@v3
12+
env:
13+
days-until-stale: 60
14+
days-until-close: 14
15+
with:
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
stale-issue-message: "This issue is stale because it has been open for ${{ env.days-until-stale }} days with no activity. Remove the stale label or comment to keep this issue open. Otherwise, this issue will be closed in ${{ env.days-until-close }} days."
18+
stale-pr-message: "This pull request is stale because it has been open for ${{ env.days-until-stale }} days with no activity. Remove the stale label or comment to keep this pull request open. Otherwise, this pull request will be closed in ${{ env.days-until-close }} days."
19+
days-before-stale: ${{ env.days-until-stale }}
20+
days-before-close: ${{ env.days-until-close }}
21+
stale-issue-label: "stale"
22+
stale-pr-label: "stale"
23+
exempt-pr-labels: "breaking change"

.gitignore

+5-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
1-
/.*
2-
!/.gitignore
3-
!/.github
4-
!/.travis.yml
1+
.*
2+
!.gitignore
3+
!.github
4+
!.editorconfig
55

6-
# Dependencies
7-
bower_components
8-
node_modules
9-
10-
# Generated files
116
output
127
generated-docs
13-
14-
# Lockfiles
15-
package-lock.json
16-
*.lock
17-
18-
# Extra files
19-
!/.jscsrc
20-
!/.jshintrc
8+
bower_components

.travis.yml

-23
This file was deleted.

README.md

100755100644
+34-15
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# purescript-argonaut
1+
# Argonaut
22

3-
[![Latest Release](http://img.shields.io/github/release/purescript-contrib/purescript-argonaut.svg)](https://github.com/purescript-contrib/purescript-argonaut/releases)
4-
[![Build Status](https://travis-ci.org/purescript-contrib/purescript-argonaut.svg)](https://travis-ci.org/purescript-contrib/purescript-argonaut)
5-
[![Pursuit](http://pursuit.purescript.org/packages/purescript-argonaut/badge)](http://pursuit.purescript.org/packages/purescript-argonaut/)
6-
[![Maintainer: garyb](https://img.shields.io/badge/maintainer-garyb-lightgrey.svg)](http://github.com/garyb)
7-
[![Maintainer: thomashoneyman](https://img.shields.io/badge/maintainer-thomashoneyman-lightgrey.svg)](http://github.com/thomashoneyman)
3+
[![CI](https://github.com/purescript-contrib/purescript-argonaut/workflows/CI/badge.svg?branch=main)](https://github.com/purescript-contrib/purescript-argonaut/actions?query=workflow%3ACI+branch%3Amain)
4+
[![Release](http://img.shields.io/github/release/purescript-contrib/purescript-argonaut.svg)](https://github.com/purescript-contrib/purescript-argonaut/releases)
5+
[![Pursuit](http://pursuit.purescript.org/packages/purescript-argonaut/badge)](http://pursuit.purescript.org/packages/purescript-argonaut)
6+
[![Maintainer: garyb](https://img.shields.io/badge/maintainer-garyb-teal.svg)](http://github.com/garyb)
7+
[![Maintainer: thomashoneyman](https://img.shields.io/badge/maintainer-thomashoneyman-teal.svg)](http://github.com/thomashoneyman)
88

99
[Argonaut](https://github.com/purescript-contrib/purescript-argonaut) is a collection of libraries for working with JSON in PureScript. This library bundles together the following:
1010

@@ -14,23 +14,42 @@
1414

1515
## Installation
1616

17+
Install `argonaut` with [Spago](https://github.com/purescript/spago):
18+
1719
```sh
18-
# with Spago
1920
spago install argonaut
20-
21-
# with Bower
22-
bower install purescript-argonaut
2321
```
2422

25-
## Documentation
23+
You can also install Argonaut libraries individually (for example, by only installing `argonaut-core` for the `Json` type).
2624

27-
Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-argonaut).
25+
## Quick start
2826

29-
- To learn more about Argonaut, its basic data types, and its approach to JSON, see [purescript-argonaut-core](https://github.com/purescript-contrib/purescript-argonaut-core).
30-
- To learn more about encoding and decoding PureScript types to and from `Json`, see [purescript-argonaut-codecs](https://github.com/purescript-contrib/purescript-argonaut-codecs).
27+
This library bundles together several other libraries. We recommend checking out the quick starts for those libraries depending on which use case you're looking for:
28+
29+
- To learn more about the basic data types and parsing functions in Argonaut, see [purescript-argonaut-core](https://github.com/purescript-contrib/purescript-argonaut-core).
30+
- To learn more about encoding and decoding PureScript types to and from `Json` using type classes, see [purescript-argonaut-codecs](https://github.com/purescript-contrib/purescript-argonaut-codecs).
31+
- To learn more about encoding and decoding PureScript types to and from `Json` using profunctors, see [purescript-codec-argonaut](https://github.com/garyb/purescript-codec-argonaut).
3132
- To learn more about manipulating `Json` using optics and `JCursor`, see [purescript-argonaut-traversals](https://github.com/purescript-contrib/purescript-argonaut-traversals)
3233

34+
## Documentation
35+
36+
`argonaut` documentation is stored in a few places:
37+
38+
1. Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-argonaut).
39+
2. Written documentation and [the changelog](./docs/CHANGELOG.md) are kept in [the docs directory](./docs).
40+
3. Usage examples can be found in [the test suite](./test).
41+
42+
If you get stuck, there are several ways to get help:
43+
44+
- [Open an issue](https://github.com/purescript-contrib/purescript-argonaut/issues) if you have encountered a bug or problem.
45+
- [Search or start a thread on the PureScript Discourse](https://discourse.purescript.org) if you have general questions. You can also ask questions in the `#purescript` and `#purescript-beginners` channels on the [Functional Programming Slack](https://functionalprogramming.slack.com) ([invite link](https://fpchat-invite.herokuapp.com/)).
3346

3447
## Contributing
3548

36-
Read the [contribution guidelines](https://github.com/purescript-contrib/purescript-argonaut/blob/master/.github/contributing.md) to get started and see helpful related resources.
49+
You can contribute to `argonaut` in several ways:
50+
51+
1. If you encounter a problem or have a question, please [open an issue](https://github.com/purescript-contrib/purescript-argonaut/issues). We'll do our best to work with you to resolve or answer it.
52+
53+
2. If you would like to contribute code, tests, or documentation, please [read the contributor guide](./.github/CONTRIBUTING.md). It's a short, helpful introduction to contributing to this library, including development instructions.
54+
55+
3. If you have written a library, tutorial, guide, or other resource based on this package, please share it on the [PureScript Discourse](https://discourse.purescript.org)! Writing libraries and learning resources are a great way to help this library succeed.

docs/CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
Notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4+
5+
## [Unreleased]
6+
7+
Breaking changes (😱!!!):
8+
9+
New features:
10+
11+
Bugfixes:
12+
13+
Other improvements:
14+
15+
## [0.0.0] - 2020-01-01

docs/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Argonaut Documentation
2+
3+
This directory contains documentation for `argonaut`. If you are interested in contributing new documentation, please read the [contributor guidelines](../.github/CONTRIBUTING.md) and [What Nobody Tells You About Documentation](https://documentation.divio.com) for help getting started.

package.json

-13
This file was deleted.

packages.dhall

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
let upstream =
2+
https://github.com/purescript/package-sets/releases/download/psc-0.13.8-20200831/packages.dhall sha256:cdb3529cac2cd8dd780f07c80fd907d5faceae7decfcaa11a12037df68812c83
3+
4+
in upstream

0 commit comments

Comments
 (0)