Common front-end components for Web using the Tesseract design system, written for React. https://make.modal.sh/tesseract/web/react/common
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

25 рядки
742 B

  1. #!/usr/bin/env node
  2. const docgen = require('react-docgen-typescript')
  3. const path = require('path')
  4. const fs = require('fs')
  5. const componentsPath = path.resolve(__dirname, '..', '..', 'react-common', 'src', 'components')
  6. fs.readdir(componentsPath, (err, dir) => {
  7. const trueFilePaths = dir.map(d => path.resolve(__dirname, '..', '..', 'react-common', 'src', 'components', d, `${d}.tsx`))
  8. const docs = docgen.parse(
  9. trueFilePaths,
  10. {
  11. shouldExtractLiteralValuesFromEnum: true,
  12. shouldRemoveUndefinedFromOptional: true,
  13. propFilter: {
  14. skipPropsWithName: ['key', 'ref'],
  15. },
  16. }
  17. )
  18. fs.writeFile(path.resolve(__dirname, '..', 'src', 'docgen.json'), JSON.stringify(docs, null, 2), (err) => {
  19. })
  20. })