Skip to content

Commit

Permalink
fix: ts types. remove version. update deps #9 #5
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova committed Nov 13, 2018
1 parent bb1b9e1 commit ca4521c
Show file tree
Hide file tree
Showing 4 changed files with 480 additions and 3,340 deletions.
7 changes: 1 addition & 6 deletions bin/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,16 @@ 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 normalizeVersion = normalizePackage.version
const cleanedContent = normalizeContent.replace(cleanRegexp, '').replace(/^\s*\n/gm, '')

const resultContent = `
import { css, createGlobalStyle } from 'styled-components'
export const version = '${normalizeVersion}'
export const normalize = css\`
${cleanedContent}
\`
export const Normalize = createGlobalStyle
? createGlobalStyle\`\${normalize}\`
: () => null
export const Normalize = createGlobalStyle\`\${normalize}\`
export default normalize
`
Expand Down
4 changes: 1 addition & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { InterpolationValue, GlobalStyleClass, DefaultTheme } from 'styled-components'

export const version: string

declare const normalize: InterpolationValue
declare const Normalize: (() => null) | GlobalStyleClass<{}, DefaultTheme>
declare const Normalize: GlobalStyleClass<{}, DefaultTheme>

export { normalize, Normalize }
export default normalize
Loading

0 comments on commit ca4521c

Please sign in to comment.