Skip to content
This repository was archived by the owner on Dec 24, 2020. It is now read-only.

Commit d5bd225

Browse files
committed
init create-react-hook@3.0.0
0 parents  commit d5bd225

20 files changed

+24000
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
# See https://help.github.com/ignore-files/ for more about ignoring files.
3+
4+
# dependencies
5+
node_modules
6+
7+
# builds
8+
build
9+
dist
10+
.rpt2_cache
11+
12+
# misc
13+
.DS_Store
14+
.env
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: node_js
2+
node_js:
3+
- 8

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# @codefund/react-codefund-hook
2+
3+
> CodeFund.io API hook for React.js
4+
5+
[![NPM](https://img.shields.io/npm/v/@codefund/react-codefund-hook.svg)](https://www.npmjs.com/package/@codefund/react-codefund-hook) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
6+
7+
## Install
8+
9+
```bash
10+
npm install --save @codefund/react-codefund-hook
11+
```
12+
13+
## Usage
14+
15+
```tsx
16+
import * as React from 'react'
17+
18+
import { useMyHook } from '@codefund/react-codefund-hook'
19+
20+
const Example = () => {
21+
const example = useMyHook()
22+
return (
23+
<div>
24+
{example}
25+
</div>
26+
)
27+
}
28+
```
29+
30+
## License
31+
32+
MIT © [andrewmcodes](https://github.com/andrewmcodes)
33+
34+
---
35+
36+
This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).

example/README.md

Lines changed: 2026 additions & 0 deletions
Large diffs are not rendered by default.

example/package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "@codefund/react-codefund-hook-example",
3+
"homepage": "https://andrewmcodes.github.io/@codefund/react-codefund-hook",
4+
"version": "0.0.0",
5+
"license": "MIT",
6+
"private": true,
7+
"dependencies": {
8+
"react": "link:../node_modules/react",
9+
"react-dom": "^16.9.0",
10+
"react-scripts": "^3.0.1",
11+
"@codefund/react-codefund-hook": "link:.."
12+
},
13+
"scripts": {
14+
"start": "react-scripts start",
15+
"build": "react-scripts build",
16+
"test": "react-scripts test --env=jsdom",
17+
"eject": "react-scripts eject"
18+
},
19+
"browserslist": [
20+
">0.2%",
21+
"not dead",
22+
"not ie <= 11",
23+
"not op_mini all"
24+
]
25+
}

example/public/index.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6+
<meta name="theme-color" content="#000000">
7+
8+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
9+
10+
<title>@codefund/react-codefund-hook</title>
11+
</head>
12+
13+
<body>
14+
<noscript>
15+
You need to enable JavaScript to run this app.
16+
</noscript>
17+
18+
<div id="root"></div>
19+
</body>
20+
</html>

example/public/manifest.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"short_name": "@codefund/react-codefund-hook",
3+
"name": "@codefund/react-codefund-hook",
4+
"start_url": "./index.html",
5+
"display": "standalone",
6+
"theme_color": "#000000",
7+
"background_color": "#ffffff"
8+
}

example/src/App.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react'
2+
3+
import { useMyHook } from '@codefund/react-codefund-hook'
4+
5+
const App = () => {
6+
const example = useMyHook()
7+
return (
8+
<div>
9+
{example}
10+
</div>
11+
)
12+
}
13+
export default App

example/src/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* body {
2+
margin: 0;
3+
padding: 0;
4+
font-family: sans-serif;
5+
} */

0 commit comments

Comments
 (0)