diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..2bf5e20 --- /dev/null +++ b/.npmignore @@ -0,0 +1,18 @@ +.circleci +.github +.storybook +coverage +src +stories +.all-contributorsrc +.babelrc +.eslintrc.js +.nvmrc +commitlint.config.js +jest.config.js +lint-staged.config.js +now.json +package-lock.json +release.config.js +renovate.json +tsconfig.json diff --git a/package.json b/package.json index fa08863..cc66f25 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,19 @@ "name": "@status-board/components", "version": "0.0.0-development", "license": "MIT", + "main": "lib/index.js", + "typings": "lib/index.d.ts", "publishConfig": { "access": "public" }, + "files": [ + "lib" + ], "scripts": { "type-check": "tsc --noEmit", "type-check:watch": "npm run type-check -- --watch", "build": "npm run build:types && npm run build:js", - "build:types": "tsc", + "build:types": "tsc --emitDeclarationOnly", "build:js": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline", "clean": "rimraf lib coverage", "commit": "git-cz", diff --git a/src/components/Widget/IconWrapper.tsx b/src/components/Widget/IconWrapper.tsx index 7f8e295..833f19e 100644 --- a/src/components/Widget/IconWrapper.tsx +++ b/src/components/Widget/IconWrapper.tsx @@ -1,6 +1,6 @@ /** @jsx jsx */ import { jsx } from '@emotion/core'; -import { CSSProperties, ReactElement, ReactNode } from 'react'; +import { ReactElement, ReactNode } from 'react'; import { withTheme } from 'emotion-theming'; import { Theme } from '@status-board/theme-manager/lib/types'; diff --git a/src/components/WidgetCounter/CountText.tsx b/src/components/WidgetCounter/CountText.tsx index 14a4a6a..710101c 100644 --- a/src/components/WidgetCounter/CountText.tsx +++ b/src/components/WidgetCounter/CountText.tsx @@ -1,6 +1,6 @@ /** @jsx jsx */ import { jsx } from '@emotion/core'; -import { CSSProperties, ReactElement, ReactNode } from 'react'; +import { ReactElement, ReactNode } from 'react'; import { typography } from '@status-board/theme-manager'; import { Theme } from '@status-board/theme-manager/lib/types'; import { withTheme } from 'emotion-theming'; diff --git a/src/components/WidgetCounter/PostLabel.tsx b/src/components/WidgetCounter/PostLabel.tsx index b916591..3ab7fd8 100644 --- a/src/components/WidgetCounter/PostLabel.tsx +++ b/src/components/WidgetCounter/PostLabel.tsx @@ -1,6 +1,6 @@ /** @jsx jsx */ import { jsx } from '@emotion/core'; -import { CSSProperties, ReactElement, ReactNode } from 'react'; +import { ReactElement, ReactNode } from 'react'; import { withTheme } from 'emotion-theming'; import { typography } from '@status-board/theme-manager'; import { Theme } from '@status-board/theme-manager/lib/types'; diff --git a/src/components/WidgetCounter/PreLabel.tsx b/src/components/WidgetCounter/PreLabel.tsx index b78dac8..7ad66cf 100644 --- a/src/components/WidgetCounter/PreLabel.tsx +++ b/src/components/WidgetCounter/PreLabel.tsx @@ -1,6 +1,6 @@ /** @jsx jsx */ import { jsx } from '@emotion/core'; -import { CSSProperties, ReactElement, ReactNode } from 'react'; +import { ReactElement, ReactNode } from 'react'; import { typography } from '@status-board/theme-manager'; import { Theme } from '@status-board/theme-manager/lib/types'; import { withTheme } from 'emotion-theming'; diff --git a/src/components/WidgetCounter/Unit.tsx b/src/components/WidgetCounter/Unit.tsx index 4937052..4994d6e 100644 --- a/src/components/WidgetCounter/Unit.tsx +++ b/src/components/WidgetCounter/Unit.tsx @@ -1,6 +1,6 @@ /** @jsx jsx */ import { jsx } from '@emotion/core'; -import { CSSProperties, ReactElement, ReactNode } from 'react'; +import { ReactElement, ReactNode } from 'react'; import { typography } from '@status-board/theme-manager'; import { Theme } from '@status-board/theme-manager/lib/types'; import { withTheme } from 'emotion-theming'; diff --git a/src/components/WidgetLabel/Addon.tsx b/src/components/WidgetLabel/Addon.tsx index b7b99c7..fa1a02e 100644 --- a/src/components/WidgetLabel/Addon.tsx +++ b/src/components/WidgetLabel/Addon.tsx @@ -1,6 +1,6 @@ /** @jsx jsx */ import { jsx } from '@emotion/core'; -import { CSSProperties, ReactElement, ReactNode } from 'react'; +import { ReactElement, ReactNode } from 'react'; import { Theme } from '@status-board/theme-manager/lib/types'; import { withTheme } from 'emotion-theming'; diff --git a/src/components/WidgetLabel/Label.tsx b/src/components/WidgetLabel/Label.tsx index 36010ca..900c53a 100644 --- a/src/components/WidgetLabel/Label.tsx +++ b/src/components/WidgetLabel/Label.tsx @@ -1,6 +1,6 @@ /** @jsx jsx */ import { jsx } from '@emotion/core'; -import { CSSProperties, ReactElement, ReactNode } from 'react'; +import { ReactElement, ReactNode } from 'react'; import { Theme } from '@status-board/theme-manager/lib/types'; import { withTheme } from 'emotion-theming'; diff --git a/src/components/WidgetListItem/Title.tsx b/src/components/WidgetListItem/Title.tsx index 9c835b2..078a66c 100644 --- a/src/components/WidgetListItem/Title.tsx +++ b/src/components/WidgetListItem/Title.tsx @@ -1,6 +1,6 @@ /** @jsx jsx */ import { jsx } from '@emotion/core'; -import { CSSProperties, ReactElement, ReactNode } from 'react'; +import { ReactElement, ReactNode } from 'react'; import { typography } from '@status-board/theme-manager'; import { Theme } from '@status-board/theme-manager/lib/types'; import { withTheme } from 'emotion-theming'; diff --git a/tsconfig.json b/tsconfig.json index 0980b23..f322a5d 100755 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,25 +1,32 @@ { "compilerOptions": { - "target": "es5", + "outDir": "lib", + "allowSyntheticDefaultImports": true, + "target": "esnext", + "module": "esnext", "lib": [ "dom", - "dom.iterable", "esnext" ], - "allowJs": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, + "importHelpers": true, + "declaration": true, + "sourceMap": true, "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "esnext", + "noImplicitAny": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "strictPropertyInitialization": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "preserve" + "jsx": "react", + "esModuleInterop": true }, "include": [ - "src" + "src/**/*" ] }