Skip to content

Commit 8da54b2

Browse files
committed
Added common js build.
1 parent 9aebeb2 commit 8da54b2

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

packages/module/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
"main": "dist/esm/index.js",
66
"module": "dist/esm/index.js",
77
"scripts": {
8-
"build": "tsc --build --verbose ./tsconfig.json && yarn build:css && yarn transform:css",
8+
"build": "yarn build:js && yarn build:esm && yarn build:fed:packages",
9+
"build:esm": "tsc --build --verbose ./tsconfig.json && yarn build:css && yarn transform:css",
910
"build:css": "node ../../scripts/build-styles.js",
10-
"copy-files": "copyfiles -u 1 src/**/*.scss dist/esm",
1111
"build:fed:packages": "node generate-fed-package-json.js",
12+
"build:js": "tsc -p tsconfig.cjs.json",
13+
"copy-files": "copyfiles -u 1 src/**/*.scss dist/esm",
1214
"clean": "rimraf dist",
1315
"docs:develop": "pf-docs-framework start",
1416
"docs:build": "pf-docs-framework build all --output public",

packages/module/src/ErrorBoundary/ErrorBoundary.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,22 @@ import ErrorStack from './ErrorStack';
66
import Section from '../Section';
77

88
interface ErrorPageProps {
9+
/** The title to display on the error page */
910
headerTitle: string;
11+
/** Indicates if this is a silent error */
1012
silent?: boolean;
13+
/** Title given to the error */
1114
errorTitle?: string;
15+
/** A description of the error */
1216
errorDescription?: string;
1317
}
1418

1519
interface ErrorPageState {
20+
/** Indicates if there is currently an error */
1621
hasError: boolean;
22+
/** Error */
1723
error?: Error;
24+
/** Used for browser session history */
1825
historyState: History['state'];
1926
}
2027

packages/module/tsconfig.cjs.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "./dist/cjs",
5+
"module": "commonjs"
6+
}
7+
}
8+

0 commit comments

Comments
 (0)