Skip to content

Commit

Permalink
Finalize release with some doc adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
duncsully committed Apr 7, 2021
1 parent 388b0e2 commit c74f434
Show file tree
Hide file tree
Showing 6 changed files with 378 additions and 64 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
/_site/
/dist/
/out-tsc/
/storybook-static

debug.log
58 changes: 2 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ npm i ds-sorter
| `rules` | `rules` | `Rule[]` | [{"key":["innerText"]}] | A list of rule objects to sort the elements by. Refer to Rule interface for properties. |

### Rule Interface

| Property | Type | Description |
|------------|---------------------|-------------|
| `key` | `string \| string[]` | Attribute name, or array representing a path of properties. (e.g. el.innerText -> ['innerText'] or el.someObj.someChild.someGrandchild -> ['someObj', 'someChild', 'someGrandchild']) </br>Note: Changes to values of sorted attributes will trigger a re-sort. Changes to sorted properties will not. |
Expand All @@ -58,59 +59,4 @@ npm i ds-sorter

## Contributing

Feel free to create tickets for bugs or feature requests, or to submit PRs.
### Linting with ESLint, Prettier, and Types
To scan the project for linting errors
```bash
npm run lint
```

You can lint with ESLint and Prettier individually as well
```bash
npm run lint:eslint
```
```bash
npm run lint:prettier
```

To automatically fix any linting errors
```bash
npm run format
```

You can format using ESLint and Prettier individually as well
```bash
npm run format:eslint
```
```bash
npm run format:prettier
```

### Testing with Web Test Runner
To run the suite of Web Test Runner tests
```bash
npm run test
```

To run the tests in watch mode

```bash
npm run test:watch
```

### Demoing with Storybook
To run a local instance of Storybook
```bash
npm run storybook
```

To build a production version of Storybook,
```bash
npm run storybook:build
```

### Local Demo with `web-dev-server`
```bash
npm start
```
To run a local development server that serves the basic demo located in `demo/index.html`
Feel free to create tickets for bugs or feature requests, or to submit PRs. Please see [CONTRIBUTING.md](docs/CONTRIBUTING.md) for more information about developing in ds-sorter.
60 changes: 60 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Contributing
Feel free to create tickets for bugs or feature requests, or to submit PRs. (More guidance for contributing coming soon)

## Developing with ds-sorter

### Linting with ESLint, Prettier, and Types
To scan the project for linting errors
```bash
npm run lint
```

You can lint with ESLint and Prettier individually as well
```bash
npm run lint:eslint
```
```bash
npm run lint:prettier
```

To automatically fix any linting errors
```bash
npm run format
```

You can format using ESLint and Prettier individually as well
```bash
npm run format:eslint
```
```bash
npm run format:prettier
```

### Testing with Web Test Runner
To run the suite of Web Test Runner tests
```bash
npm run test
```

To run the tests in watch mode

```bash
npm run test:watch
```

### Demoing with Storybook
To run a local instance of Storybook
```bash
npm run storybook
```

To build a production version of Storybook,
```bash
npm run storybook:build
```

### Local Demo with `web-dev-server`
```bash
npm start
```
To run a local development server that serves the basic demo located in `demo/index.html`
Loading

0 comments on commit c74f434

Please sign in to comment.