diff --git a/packages/etablert-tilsyn/package.json b/packages/etablert-tilsyn/package.json index eda19469..29d9d4f1 100644 --- a/packages/etablert-tilsyn/package.json +++ b/packages/etablert-tilsyn/package.json @@ -10,11 +10,12 @@ "scripts": { "test": "jest --maxWorkers=2", "test-watch": "jest --watch", - "build": "webpack --config webpack/webpack-config.production.js", + "build": "webpack --config webpack/webpack-config.production.js && yarn ts-declarations", "dev": "node webpack/webpack-config.development.js", "majorVersion": "node ./majorVersion.js", "lint": "eslint 'src/**/*.{ts,tsx,js,jsx}'", "ts-check": "tsc --pretty --noEmit", + "ts-declarations": "tsc", "api-mock": "ts-node mock/api-mock.ts", "cypress:headless": "cypress open", "test:e2e": "start-server-and-test dev http://localhost:8484 cypress:headless" diff --git a/packages/etablert-tilsyn/tsconfig.json b/packages/etablert-tilsyn/tsconfig.json index 5b431beb..dfdc9a4f 100644 --- a/packages/etablert-tilsyn/tsconfig.json +++ b/packages/etablert-tilsyn/tsconfig.json @@ -8,7 +8,10 @@ "target": "esnext", "typeRoots": ["../../node_modules/@types"], "esModuleInterop": true, - "allowJs": true + "allowJs": true, + "outDir": "./build/", + "emitDeclarationOnly": true }, + "include": ["src", "@types"], "exclude": ["node_modules", "build", "**/*.spec.ts", "**/*.spec.tsx", "./cypress.config.ts"] } diff --git a/packages/inntektsmelding/package.json b/packages/inntektsmelding/package.json index 154ea2e5..fa20a58b 100644 --- a/packages/inntektsmelding/package.json +++ b/packages/inntektsmelding/package.json @@ -10,12 +10,13 @@ "scripts": { "test": "jest --passWithNoTests --maxWorkers=2", "test-watch": "jest --watch", - "build": "webpack --config webpack/webpack-config.production.js", + "build": "webpack --config webpack/webpack-config.production.js && yarn ts-declarations", "dev": "node webpack/webpack-config.development.js", "api-mock": "ts-node mock/api-mock.ts", "majorVersion": "node ./majorVersion.js", "lint": "eslint 'src/**/*.{ts,tsx,js,jsx}'", "ts-check": "tsc --pretty --noEmit", + "ts-declarations": "tsc", "start:e2e": "nodemon mock/api-mock.ts & node webpack/webpack-config.development.js", "storybook": "start-storybook -p 6006 -s public", "build-storybook": "build-storybook" diff --git a/packages/inntektsmelding/src/stories/MainComponent.stories.tsx b/packages/inntektsmelding/src/stories/MainComponent.stories.tsx index a7640237..f0805e4a 100644 --- a/packages/inntektsmelding/src/stories/MainComponent.stories.tsx +++ b/packages/inntektsmelding/src/stories/MainComponent.stories.tsx @@ -1,7 +1,10 @@ -import React from 'react'; +import { ComponentStory } from '@storybook/react'; import { rest } from 'msw'; -import { ComponentStory, ComponentMeta } from '@storybook/react'; -import MainComponent from '../ui/MainComponent'; +import React from 'react'; +import inntektsmeldingPropsMock, { + aksjonspunkt9071FerdigProps, + aksjonspunkt9071Props, +} from '../../mock/inntektsmeldingPropsMock'; import ferdigvisning, { alleErMottatt, ikkePaakrevd, @@ -9,14 +12,14 @@ import ferdigvisning, { manglerFlereInntektsmeldinger, manglerInntektsmelding, } from '../../mock/mockedKompletthetsdata'; -import inntektsmeldingPropsMock, { aksjonspunkt9071FerdigProps, aksjonspunkt9071Props } from '../../mock/inntektsmeldingPropsMock'; +import MainComponent from '../ui/MainComponent'; export default { args: inntektsmeldingPropsMock, argTypes: { onFinished: { action: 'clicked' } }, title: 'Inntektsmelding', component: MainComponent, -} as ComponentMeta; +}; const Template: ComponentStory = (args: any) => ; diff --git a/packages/inntektsmelding/tsconfig.json b/packages/inntektsmelding/tsconfig.json index b7ddbd3d..8c387c50 100644 --- a/packages/inntektsmelding/tsconfig.json +++ b/packages/inntektsmelding/tsconfig.json @@ -8,7 +8,10 @@ "target": "esnext", "typeRoots": ["../../node_modules/@types"], "types": ["node", "jest"], - "esModuleInterop": true + "esModuleInterop": true, + "outDir": "./build/", + "emitDeclarationOnly": true }, + "include": ["src", "@types"], "exclude": ["build"] } diff --git "a/packages/medisinsk-vilk\303\245r/package.json" "b/packages/medisinsk-vilk\303\245r/package.json" index a8189b55..e4656784 100644 --- "a/packages/medisinsk-vilk\303\245r/package.json" +++ "b/packages/medisinsk-vilk\303\245r/package.json" @@ -11,12 +11,13 @@ "test": "cross-env DEBUG=test JEST_PUPPETEER_CONFIG=./jest-puppeteer.config.js jest --maxWorkers=2 --detectOpenHandles --config=./jest.config.js ", "test-watch": "jest --watch", "test-update-snapshots": "cross-env DEBUG=test JEST_PUPPETEER_CONFIG=./jest-puppeteer.config.js jest --maxWorkers=2 --detectOpenHandles --config=./jest.config.js -u", - "build": "cross-env NODE_ENV=production webpack --config webpack/webpack-config.production.js", + "build": "cross-env NODE_ENV=production webpack --config webpack/webpack-config.production.js && yarn ts-declarations", "dev": "node webpack/webpack-config.development.js", "api-mock-ls": "nodemon mock/api-mock-livets-sluttfase.ts", "majorVersion": "node ./majorVersion.js", "lint": "eslint 'src/**/*.{ts,tsx,js,jsx}'", "ts-check": "tsc --pretty --noEmit", + "ts-declarations": "tsc", "cypress:headless": "cypress run", "test:e2e": "start-server-and-test dev http://localhost:8081 cypress:headless", "start-ls:e2e": "nodemon mock/api-mock-livets-sluttfase.ts & node webpack/webpack-config.development.js" diff --git "a/packages/medisinsk-vilk\303\245r/tsconfig.json" "b/packages/medisinsk-vilk\303\245r/tsconfig.json" index bcca7afa..74b53c5a 100644 --- "a/packages/medisinsk-vilk\303\245r/tsconfig.json" +++ "b/packages/medisinsk-vilk\303\245r/tsconfig.json" @@ -9,7 +9,10 @@ "typeRoots": ["../../node_modules/@types"], "types": ["node", "jest"], "esModuleInterop": true, - "allowJs": true + "allowJs": true, + "outDir": "./build/", + "emitDeclarationOnly": true }, + "include": ["src", "@types"], "exclude": ["node_modules", "build", "**/*.spec.ts", "**/*.spec.tsx", "dist", "./cypress.config.ts"] } diff --git a/packages/om-barnet/package.json b/packages/om-barnet/package.json index 9d324b28..ca48cca6 100644 --- a/packages/om-barnet/package.json +++ b/packages/om-barnet/package.json @@ -10,11 +10,12 @@ "scripts": { "test": "jest", "test-watch": "jest --watch", - "build": "cross-env NODE_ENV=production webpack --config webpack/webpack-config.production.js", + "build": "cross-env NODE_ENV=production webpack --config webpack/webpack-config.production.js && yarn ts-declarations", "dev": "node webpack/webpack-config.development.js", "majorVersion": "node ./majorVersion.js", "lint": "eslint 'src/**/*.{ts,tsx,js,jsx}'", "ts-check": "tsc --pretty --noEmit", + "ts-declarations": "tsc", "api-mock": "ts-node mock/api-mock.ts" }, "pre-commit": [ diff --git a/packages/om-barnet/tsconfig.json b/packages/om-barnet/tsconfig.json index bcca7afa..74b53c5a 100644 --- a/packages/om-barnet/tsconfig.json +++ b/packages/om-barnet/tsconfig.json @@ -9,7 +9,10 @@ "typeRoots": ["../../node_modules/@types"], "types": ["node", "jest"], "esModuleInterop": true, - "allowJs": true + "allowJs": true, + "outDir": "./build/", + "emitDeclarationOnly": true }, + "include": ["src", "@types"], "exclude": ["node_modules", "build", "**/*.spec.ts", "**/*.spec.tsx", "dist", "./cypress.config.ts"] } diff --git a/packages/omsorgen-for/package.json b/packages/omsorgen-for/package.json index 22a44cfa..453df1f4 100644 --- a/packages/omsorgen-for/package.json +++ b/packages/omsorgen-for/package.json @@ -10,12 +10,13 @@ "scripts": { "test": "jest --passWithNoTests --maxWorkers=2", "test-watch": "jest --watch", - "build": "webpack --config webpack/webpack-config.production.js", + "build": "webpack --config webpack/webpack-config.production.js && yarn ts-declarations", "api-mock": "ts-node mock/api-mock.ts", "dev": "node webpack/webpack-config.development.js", "majorVersion": "node ./majorVersion.js", "lint": "eslint 'src/**/*.{ts,tsx,js,jsx}'", "ts-check": "tsc --pretty --noEmit", + "ts-declarations": "tsc", "start:e2e": "nodemon mock/api-mock.ts & node webpack/webpack-config.development.js" }, "keywords": [], diff --git a/packages/omsorgen-for/tsconfig.json b/packages/omsorgen-for/tsconfig.json index 323e85c1..6f7dcded 100644 --- a/packages/omsorgen-for/tsconfig.json +++ b/packages/omsorgen-for/tsconfig.json @@ -8,7 +8,10 @@ "target": "esnext", "typeRoots": ["./node_modules/@types"], "esModuleInterop": true, - "allowJs": true + "allowJs": true, + "outDir": "./build/", + "emitDeclarationOnly": true }, + "include": ["src", "@types"], "exclude": ["node_modules", "build"] } diff --git a/packages/omsorgsdager/package.json b/packages/omsorgsdager/package.json index 91bd4c8d..f272bac0 100644 --- a/packages/omsorgsdager/package.json +++ b/packages/omsorgsdager/package.json @@ -9,11 +9,12 @@ ], "scripts": { "test": "jest --maxWorkers=2 --detectOpenHandles --config=./jest.config.js", - "build": "cross-env NODE_ENV=production webpack --config webpack/webpack-config.production.js", + "build": "cross-env NODE_ENV=production webpack --config webpack/webpack-config.production.js && yarn ts-declarations", "dev": "node webpack/webpack-config.development.js", "lint": "eslint src/**/*.{ts,tsx,js,jsx}", "lint:css": "stylelint src/**/*.{less,css}", "ts-check": "tsc --pretty --noEmit", + "ts-declarations": "tsc", "checkPackageUpgrade": "yarn test && yarn lint && yarn lint:css && yarn build" }, "keywords": [], diff --git a/packages/omsorgsdager/tsconfig.json b/packages/omsorgsdager/tsconfig.json index a6a660c4..f226dce1 100644 --- a/packages/omsorgsdager/tsconfig.json +++ b/packages/omsorgsdager/tsconfig.json @@ -8,7 +8,10 @@ "target": "esnext", "typeRoots": ["../../node_modules/@types"], "esModuleInterop": true, - "allowJs": true + "allowJs": true, + "outDir": "./build/", + "emitDeclarationOnly": true }, + "include": ["src", "@types"], "exclude": ["node_modules", "build", "**/*.spec.ts", "**/*.spec.tsx"] } diff --git a/packages/uttak/package.json b/packages/uttak/package.json index a10b212e..a191be93 100644 --- a/packages/uttak/package.json +++ b/packages/uttak/package.json @@ -10,12 +10,13 @@ "scripts": { "test": "jest --passWithNoTests --maxWorkers=2", "test-watch": "jest --watch", - "build": "webpack --config webpack/webpack-config.production.js", + "build": "webpack --config webpack/webpack-config.production.js && yarn ts-declarations", "dev": "node webpack/webpack-config.development.js", "api-mock": "ts-node mock/api-mock.ts", "majorVersion": "node ./majorVersion.js", "lint": "eslint 'src/**/*.{ts,tsx,js,jsx}'", - "ts-check": "tsc --pretty --noEmit" + "ts-check": "tsc --pretty --noEmit", + "ts-declarations": "tsc" }, "pre-commit": [ "lint", diff --git a/packages/uttak/tsconfig.json b/packages/uttak/tsconfig.json index 86c211b1..57bd4a5a 100644 --- a/packages/uttak/tsconfig.json +++ b/packages/uttak/tsconfig.json @@ -9,7 +9,10 @@ "typeRoots": ["../../node_modules/@types"], "types": ["node", "jest"], "esModuleInterop": true, - "allowJs": true + "allowJs": true, + "outDir": "./build/", + "emitDeclarationOnly": true }, + "include": ["src", "@types"], "exclude": ["node_modules", "build", "**/*.spec.ts", "**/*.spec.tsx", "dist"] }