Skip to content

Commit 2503a0c

Browse files
committed
feat: initial import
0 parents  commit 2503a0c

33 files changed

+987
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["@babel/preset-env", "@babel/preset-react"]
3+
}

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cjs/
2+
es/
3+
umd/
4+
coverage/
5+
examples/*-umd.js

.eslintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": [
4+
"eslint:recommended",
5+
"plugin:react/recommended",
6+
"plugin:import/recommended",
7+
"plugin:prettier/recommended",
8+
"plugin:react-hooks/recommended"
9+
],
10+
"env": {
11+
"browser": true,
12+
"node": true,
13+
"es6": true,
14+
"jest": true
15+
},
16+
"settings": {
17+
"react": {
18+
"version": "detect"
19+
}
20+
}
21+
}

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [14.x]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
- run: npm i
24+
- run: npm run lint
25+
- run: npm run build
26+
- run: npm test -- --coverage
27+
- run: bash <(curl -s https://codecov.io/bash)

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules/
2+
cjs/
3+
es/
4+
umd/
5+
coverage/
6+
7+
examples/*-umd.js
8+
*.map
9+
.eslintcache
10+
package-lock.json
11+
.token

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples/

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"arrowParens": "avoid",
3+
"semi": false,
4+
"singleQuote": true,
5+
"trailingComma": "es5"
6+
}

.release-it.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"git": {
3+
"commitMessage": "chore: 🚀 release v${version}"
4+
},
5+
"github": {
6+
"release": true
7+
},
8+
"hooks": {
9+
"after:bump": ["npm run toc"]
10+
}
11+
}

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ISC License
2+
3+
Copyright (c) [year], [fullname]
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted, provided that the above
7+
copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# navigation-state-hooks
2+
3+
![ci](https://github.com/simoneb/navigation-state-hooks/workflows/ci/badge.svg)
4+
[![codecov](https://codecov.io/gh/simoneb/navigation-state-hooks/branch/master/graph/badge.svg?token=9q93I8kWJR)](https://codecov.io/gh/simoneb/navigation-state-hooks)
5+
[![npm version](https://badge.fury.io/js/navigation-state-hooks.svg)](https://badge.fury.io/js/navigation-state-hooks)
6+
[![bundlephobia](https://badgen.net/bundlephobia/minzip/navigation-state-hooks)](https://bundlephobia.com/result?p=navigation-state-hooks)
7+
[![bundlephobia](https://badgen.net/bundlephobia/dependency-count/navigation-state-hooks)](https://bundlephobia.com/result?p=navigation-state-hooks)
8+
9+
React Hooks library to store navigation state and restore it.
10+
11+
<!-- toc -->
12+
13+
14+
<!-- tocstop -->
15+
16+
## Setup
17+
18+
```bash
19+
npm i navigation-state-hooks
20+
```
21+

0 commit comments

Comments
 (0)