Skip to content

Commit

Permalink
feat: upgrade normalize.css to 8.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova committed Nov 13, 2018
1 parent 1a9db45 commit 96489e9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bin/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const normalizePackage = JSON.parse(fs.readFileSync('./node_modules/normalize.cs
const normalizeMain = path.join('./node_modules/normalize.css', normalizePackage.main)
const normalizeContent = fs.readFileSync(normalizeMain, 'utf8')

const cleanedContent = normalizeContent.replace(cleanRegexp, '').replace(/^\s*\n/gm, '')
const cleanedContent = normalizeContent.replace(cleanRegexp, '').replace(/^\s*\n/gm, '').replace(/\s+$/gm, '')

const resultContent = `
import { css, createGlobalStyle } from 'styled-components'
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.5",
"babel-plugin-styled-components": "^1.8.0",
"normalize.css": "^8.0.0",
"normalize.css": "^8.0.1",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"styled-components": "^4.1.1"
Expand Down
13 changes: 4 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@

import { css, createGlobalStyle } from 'styled-components'

/**
* @deprecated
*/
export const version = '8.0.2'

export const normalize = css`
html {
line-height: 1.15;
Expand All @@ -14,6 +9,9 @@ html {
body {
margin: 0;
}
main {
display: block;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
Expand Down Expand Up @@ -150,11 +148,8 @@ template {
[hidden] {
display: none;
}
`

export const Normalize = createGlobalStyle
? createGlobalStyle`${normalize}`
: () => null
export const Normalize = createGlobalStyle`${normalize}`

export default normalize

0 comments on commit 96489e9

Please sign in to comment.