File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,13 @@ module.exports = parallel([
121
121
] ) ,
122
122
generatePackageJson ( path . join ( workspace . targetPath , 'components-definitions' ) , {
123
123
name : '@cloudscape-design/components-definitions' ,
124
+ exports : {
125
+ './components' : './components/index.js' ,
126
+ './test-utils-doc/dom' : './test-utils-doc/dom.js' ,
127
+ './test-utils-doc/selectors' : './test-utils-doc/selectors.js' ,
128
+ // this directory is generated down the line in other builds
129
+ './styles/*.json' : './styles/*.json' ,
130
+ } ,
124
131
} ) ,
125
132
styleDictionaryPackageJson ,
126
133
componentsThemeablePackageJson ,
Original file line number Diff line number Diff line change 1
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
- import { getAllComponents , requireComponentDefinition } from '../utils' ;
3
+ import definitions from '../../../lib/components-definitions/components' ;
4
+ import { getAllComponents } from '../utils' ;
5
+
6
+ function requireComponentDefinition ( componentName : string ) {
7
+ return definitions [ componentName ] ;
8
+ }
4
9
5
10
describe ( 'Documenter' , ( ) => {
6
11
test . each < string > ( getAllComponents ( ) ) ( `definition for %s matches the snapshot` , ( componentName : string ) => {
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import fs from 'fs';
5
5
import path from 'path' ;
6
6
7
7
import { SplitPanelContextProvider } from '../../lib/components/internal/context/split-panel-context' ;
8
- import definitions from '../../lib/components-definitions/components' ;
9
8
import { defaultSplitPanelContextProps } from './required-props-for-components' ;
10
9
11
10
const componentsDir = path . resolve ( __dirname , '../../lib/components' ) ;
@@ -68,10 +67,6 @@ export function requireComponent(componentName: string): any {
68
67
return require ( path . join ( componentsDir , componentName ) ) ;
69
68
}
70
69
71
- export function requireComponentDefinition ( componentName : string ) {
72
- return definitions [ componentName ] ;
73
- }
74
-
75
70
export function requireDesignTokensFile ( fileName : string ) : any {
76
71
// eslint-disable-next-line @typescript-eslint/no-require-imports
77
72
return require ( path . join ( designTokensDir , fileName ) ) ;
You can’t perform that action at this time.
0 commit comments