Skip to content
This repository was archived by the owner on Oct 27, 2021. It is now read-only.

Commit 5cec979

Browse files
authored
Merge pull request #78 from spences10/develop
Move to TypeScript
2 parents 32acf12 + 6353285 commit 5cec979

15 files changed

+4718
-769
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
# Project dependencies
2-
.cache
3-
node_modules
4-
5-
# Build directory
6-
public
7-
8-
# Other
1+
*.log
92
.DS_Store
10-
yarn-error.log
3+
node_modules
4+
.cache
5+
dist

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

README.md

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
11
# A `react-seo-component`
22

3-
[![CodeFactor](https://www.codefactor.io/repository/github/spences10/react-seo-component/badge)](https://www.codefactor.io/repository/github/spences10/react-seo-component) ![bundlephobia min](https://badgen.net/bundlephobia/min/react-seo-component) ![bundlephobia minzip](https://badgen.net/bundlephobia/minzip/react)
3+
[![CodeFactor](https://www.codefactor.io/repository/github/spences10/react-seo-component/badge)](https://www.codefactor.io/repository/github/spences10/react-seo-component)
4+
![bundlephobia min](https://badgen.net/bundlephobia/min/react-seo-component)
5+
![bundlephobia minzip](https://badgen.net/bundlephobia/minzip/react)
46

57
Use it for adding canonical links, metadata and OpenGraph information
6-
to your react projects!
8+
to your React projects!
79

810
## Use it!
911

1012
Install it from npm!
1113

1214
```bash
1315
yarn add react-seo-component
16+
# peer dependency of react helmet
17+
yarn add react-helmet
1418
```
1519

16-
If you are using it with Gatsby you will need to install
17-
`gatsby-plugin-react-helmet` to have the meta tags generated at build
18-
time.
20+
If you are using it with Gatsby you will also need to install the
21+
Gatsby plugin:
22+
23+
```bash
24+
yarn add react-seo-component
25+
yarn add react-helmet
26+
yarn add gatsby-plugin-react-helmet
27+
# or in one command
28+
yarn add react-seo-component react-helmet gatsby-plugin-react-helmet
29+
```
30+
31+
This will create the meta tags at build time.
1932

2033
**Examples:**
2134

@@ -53,14 +66,6 @@ For a blog post:
5366
/>
5467
```
5568

56-
## Dependencies
57-
58-
Presumes you already have the following installed:
59-
60-
- `prop-types`
61-
- `react`
62-
- `react-helmet`
63-
6469
## Props
6570

6671
| Prop | Type | Default |
@@ -78,10 +83,28 @@ Presumes you already have the following installed:
7883
| datePublished | ISO date string | `Date.now()` |
7984
| dateModified | ISO date string | `Date.now()` |
8085

81-
## Thanks
86+
## To test locally
87+
88+
Use `npm pack` or `yarn pack` to create a `.tgz` of the project you
89+
can install locally on your project to test with.
90+
91+
```bash
92+
# from here
93+
yarn pack
94+
# copy to project to test
95+
cp react-seo-component-2.0.1.tgz ../project-to-test-with/
96+
# ~/project-to-test-with
97+
yarn add file:react-seo-component-2.0.1.tgz
98+
```
99+
100+
## Thanks:
101+
102+
- **[LekoArts]** for the initial components detailed in his Gatsby
103+
[Prismic starter].
104+
105+
- **[Leigh Halliday]** for the [primer video] on using [TSDX]
82106

83-
Thanks to [@LekoArts] for the initial components detailed in his
84-
Gatsby [Prismic starter].
107+
- **[Jared Palmer]** for [TSDX]
85108

86109
## Resources
87110

@@ -91,5 +114,9 @@ https://github.com/recraftrelic/dummy-react-npm-module/blob/master/package.json
91114

92115
<!-- Links -->
93116

94-
[@lekoarts]: https://github.com/LekoArts
117+
[lekoarts]: https://github.com/LekoArts
95118
[prismic starter]: https://github.com/LekoArts/gatsby-starter-prismic
119+
[jared palmer]: https://github.com/jaredpalmer
120+
[leigh halliday]: https://github.com/leighhalliday
121+
[tsdx]: https://github.com/jaredpalmer/tsdx
122+
[primer video]: https://www.youtube.com/watch?v=V3XZYC8zmvo

index.js

Lines changed: 0 additions & 266 deletions
This file was deleted.

0 commit comments

Comments
 (0)