Skip to content

Commit 5c3d8be

Browse files
authored
feat: improve plugin api (#15)
BREAKING CHANGE: - 'smooth/document' and '_document.js' have been replaced by "html.js", same API as Gatsby - 'smooth/head' is no longer available, use 'smooth-plugin-react-helmet' - 'styled-components' requires now a plugin : 'smooth-plugin-styled-components'
1 parent 5fca7b1 commit 5c3d8be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+827
-602
lines changed

examples/simple/package.json

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

examples/simple/src/pages/index$.js

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

examples/head-elements/package.json renamed to examples/with-react-helmet/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"dependencies": {
99
"react": "^16.8.2",
1010
"react-dom": "^16.8.2",
11-
"smooth": "latest"
11+
"react-helmet": "^5.2.0",
12+
"smooth": "latest",
13+
"smooth-plugin-react-helmet": "latest"
1214
}
1315
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
plugins: ['smooth-plugin-react-helmet'],
3+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React from 'react'
2-
import Head from 'smooth/head'
2+
import Helmet from 'react-helmet'
33

44
export default () => (
55
<>
6-
<Head>
6+
<Helmet>
77
<title>My awesome page</title>
8-
</Head>
8+
</Helmet>
99
Hello world!
1010
</>
1111
)

examples/with-styled-components/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"react": "^16.8.2",
1010
"react-dom": "^16.8.2",
1111
"smooth": "latest",
12+
"smooth-plugin-styled-components": "latest",
1213
"styled-components": "^4.1.3"
1314
}
1415
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
plugins: ['smooth-plugin-styled-components'],
3+
}

examples/with-styled-components/src/_document.js

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

0 commit comments

Comments
 (0)