Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update QA deps #25

Merged
merged 11 commits into from
Oct 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# npm files
node_modules

# Build products
# project
/lib
/public
28 changes: 28 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn --frozen-lockfile
- run: yarn qa
- run: yarn build
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# npm files
node_modules
package-lock.json
*.log*

# Build products
# project
/lib
/public

# other
.vscode
*.*~
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.15.0
v12.16.1
14 changes: 7 additions & 7 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
*.*
*
!*/
!*.js
!*.json
!*.md
!.babelrc

# Build products
/lib
/public
!*.yml

# npm files
node_modules
package.json
package-lock.json

# project
/lib
/public
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@k.sh/eslint-config/prettier');
6 changes: 0 additions & 6 deletions .prettierrc.json

This file was deleted.

22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

128 changes: 128 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributing

## Reporting Issues

If you have found what you think is a bug, please file an issue.

## Suggesting new features

If you are here to suggest a feature, first create an issue if it does not
already exist. From there, we will discuss use-cases for the feature and then
finally discuss how it could be implemented.

## Development

If you have been assigned to fix an issue or develop a new feature, please
follow these steps to get started:

- Fork this repository
- Install dependencies by running `yarn`
- Implement your changes
- Format all files `yarn format`
- Make sure the tests are passing `yarn qa`
- Git stage your required changes and commit (see below commit guidelines)
- Submit PR for review

## Commit message conventions

This project is using [Conventional Commit Message Conventions](https://www.conventionalcommits.org/en/v1.0.0/).

We have very precise rules over how our git commit messages can be formatted.
This leads to **more readable messages** that are easy to follow when looking
through the **project history**.

### Commit Message Format

> Use `yarn commit` to launch interactive CLI interface

Each commit message consists of a **header**, a **body** and a **footer**. The
header has a special format that includes a **type**, a **scope** and a **subject**:

```txt
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

The **header** is mandatory and the **scope** of the header is optional.

Any line of the commit message cannot be longer than 100 characters! This allows
the message to be easier to read on GitHub as well as in various git tools.

### Type

Must be one of the following:

- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space,
formatting, missing semi-colons, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing or correcting existing tests
- **chore**: Changes to the build process or auxiliary tools and libraries such
as documentation
generation

### Scope

The scope could be anything specifying place of the commit change.

### Subject

The subject contains succinct description of the change:

- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no dot (.) at the end

### Body

Just as in the **subject**, use the imperative, present tense: "change" not
"changed" nor "changes". The body should include the motivation for the change
and contrast this with previous behavior.

### Footer

The footer should contain any information about **Breaking Changes** and is also
the place to [reference GitHub issues that this commit closes](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue).

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space
or two newlines. The rest of the commit message is then used for this.

### Example

Here is an example of the release type that will be done based on a commit messages:

<!-- markdownlint-disable no-inline-html line-length -->
<!-- prettier-ignore-start -->

| Commit message | Release type |
| --- | --- |
| `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release |
| `feat(pencil): add graphiteWidth option` | ~~Minor~~ Feature Release |
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release |

<!-- prettier-ignore-end -->

<!-- markdownlint-enable no-inline-html line-length -->

### Revert

If the commit reverts a previous commit, it should begin with `revert:`, followed
by the header of the reverted commit. In the body it should say:
`This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.

## Pull requests

Maintainers merge pull requests by squashing all commits and editing the commit
message if necessary using the GitHub user interface.

Use an appropriate commit type. Be especially careful with breaking changes.

## Releases

The `master` branch is the main release branch, where changes get released periodically.
44 changes: 13 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
# netlify-cms-widget-inline-select

[Check out the demo!](https://netlify-cms-widget-inline-select.netlify.com/demo)

Inline radio + multi-checkboxes select widget.

[![npm version][version-badge]][version]
[![Build Status][build-badge]][build]
[![module formats: cjs][module-formats-badge]][unpkg-bundle]
![Node.js CI](https://github.com/karolis-sh/netlify-cms-widget-inline-select/workflows/Node.js%20CI/badge.svg)
[![License: MIT][license-badge]][license]

[![semantic-release][semantic-release-badge]][semantic-release]
[![code style: prettier][code-style-badge]][code-style]

![preview](docs/preview.png)
Inline radio + multi-checkboxes select widget. Check out [the demo](https://netlify-cms-widget-inline-select.netlify.com/demo)!

This widget was inspired by original [netlify-cms-widget-select][netlify-cms-widget-select].
![preview](docs/preview.png)

## Install

As an npm package:
```shell
npm i netlify-cms-widget-inline-select
```

or

```shell
npm install --save netlify-cms-widget-inline-select
yarn add netlify-cms-widget-inline-select
```

## Setup

```js
import { InlineSelectControl, InlineSelectPreview } from 'netlify-cms-widget-inline-select';

Expand All @@ -44,9 +43,7 @@ fields:

## Configuration

You can customize the preview of the url with these options:

- `options` - you can also specify the `value` and `label` in `options` option
- `options` - selection list (you can also specify the `value` and `label` separately)

```yaml
fields:
Expand All @@ -60,7 +57,7 @@ fields:
- { value: $, label: jQuery }
```

- `multiple` - add ability to select multiple items
- `multiple` - ability to select multiple items

```yaml
fields:
Expand All @@ -71,25 +68,10 @@ fields:
options: ['React', 'Angular', 'Vue', 'Other']
```

## License

MIT

## Support

For help with this widget, open an [issue](https://github.com/karolis-sh/netlify-cms-widget-inline-select)
or ask the Netlify CMS community in [Gitter](https://gitter.im/netlify/netlifycms).

[version-badge]: https://badge.fury.io/js/netlify-cms-widget-inline-select.svg
[version]: https://www.npmjs.com/package/netlify-cms-widget-inline-select
[build-badge]: https://travis-ci.org/karolis-sh/netlify-cms-widget-inline-select.svg?branch=master
[build]: https://travis-ci.org/karolis-sh/netlify-cms-widget-inline-select
[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg
[license]: https://opensource.org/licenses/MIT
[semantic-release-badge]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-release]: https://github.com/semantic-release/semantic-release
[code-style-badge]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg
[code-style]: https://github.com/prettier/prettier
[module-formats-badge]: https://img.shields.io/badge/module%20formats-cjs-green.svg
[unpkg-bundle]: https://unpkg.com/netlify-cms-widget-inline-select/lib/
[netlify-cms-widget-select]: https://www.npmjs.com/package/netlify-cms-widget-select
File renamed without changes.
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
publish = "public/"
command = "npm run build:demo"
command = "yarn build:demo"

[[redirects]]
from = "/demo"
Expand Down
Loading