-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rename cloud-cognitive and simplify component list script
- Loading branch information
1 parent
256c999
commit b381091
Showing
4 changed files
with
33 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import fs from 'fs'; | ||
import { pkg } from '@carbon/ibm-products'; | ||
import { _initStats } from '../helpers.js'; | ||
|
||
const { _stats, success } = new _initStats(); | ||
const productsDir = '../../node_modules/@carbon/ibm-products/es/components'; | ||
const products = { | ||
name: 'Carbon for IBM Products', | ||
components: {}, | ||
_stats, | ||
}; | ||
const { getDevtoolsId, devtoolsAttribute } = pkg; | ||
|
||
try { | ||
const components = fs.readdirSync(productsDir); | ||
|
||
components.forEach((file) => { | ||
if (file === '_Canary' || file === 'index.d.ts') { | ||
return; | ||
} | ||
|
||
const identifier = `[${devtoolsAttribute}="${getDevtoolsId(file)}]`; | ||
|
||
products.components[identifier] = file; | ||
success(); | ||
}); | ||
} catch (e) { | ||
console.log(e); | ||
} | ||
|
||
export { products }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export * from './carbon'; | ||
export * from './carbon-web-components'; | ||
export * from './ibmdotcom'; | ||
// export * from './cloud-cognitive'; | ||
export * from './ibm-products'; | ||
export * from './security'; | ||
export * from './cloud-pal'; |