Skip to content

Commit

Permalink
feat(react-components): migrate to internal api and export map fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotell committed Oct 20, 2022
1 parent 03a9513 commit 4c695f9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@fluentui/scripts/api-extractor/api-extractor.common.v-next.json",
"mainEntryPointFilePath": "<projectFolder>/dist/types/index.d.ts"
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "<projectFolder>/dist/index.d.ts"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@fluentui/scripts/api-extractor/api-extractor.common.v-next.json",
"mainEntryPointFilePath": "<projectFolder>/dist/types/unstable/index.d.ts",
"mainEntryPointFilePath": "<projectFolder>/../../../dist/out-tsc/types/packages/react-components/<unscopedPackageName>/src/unstable/index.d.ts",
"apiReport": {
"enabled": true,
"reportFileName": "<unscopedPackageName>.unstable.api.md"
},
"docModel": {
"enabled": true,
"apiJsonFilePath": "<projectFolder>/dist/<unscopedPackageName>.unstable.api.json"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/dist/unstable.d.ts"
"untrimmedFilePath": "",
"publicTrimmedFilePath": "<projectFolder>/dist/unstable.d.ts"
}
}
11 changes: 5 additions & 6 deletions packages/react-components/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Suite package for converged React components",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
"typings": "dist/index.d.ts",
"typings": "./dist/index.d.ts",
"sideEffects": false,
"repository": {
"type": "git",
Expand All @@ -19,11 +19,10 @@
"just": "just-scripts",
"lint": "just-scripts lint",
"start": "yarn storybook",
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/react-components/src && yarn docs",
"storybook": "start-storybook --port 3000 --no-manager-cache",
"test": "jest --passWithNoTests",
"type-check": "tsc -b tsconfig.json"
"type-check": "tsc -b tsconfig.json",
"generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
Expand Down Expand Up @@ -87,12 +86,12 @@
},
"exports": {
".": {
"types": "./lib/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./lib/index.js",
"require": "./lib-commonjs/index.js"
},
"./unstable": {
"types": "./lib/unstable/index.d.ts",
"types": "./dist/unstable.d.ts",
"import": "./lib/unstable/index.js",
"require": "./lib-commonjs/unstable/index.js"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"exports": {
".": {
"types": "./../lib/unstable/index.d.ts",
"types": "./../dist/unstable.d.ts",
"import": "./../lib/unstable/index.js",
"require": "./../lib-commonjs/unstable/index.js"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/react-components/react-components/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"compilerOptions": {
"noEmit": false,
"lib": ["ES2019", "dom"],
"outDir": "dist",
"declaration": true,
"declarationDir": "dist/types",
"declarationDir": "../../../dist/out-tsc/types",
"outDir": "../../../dist/out-tsc",
"inlineSources": true,
"types": ["static-assets", "environment"]
},
Expand Down

0 comments on commit 4c695f9

Please sign in to comment.