-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plasma-infra: Scaffold docs dir CLI #1099
Conversation
@@ -0,0 +1,25 @@ | |||
--- | |||
id: {{name}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Note]: будет подставлено название компонента, например Avatar
|
||
```tsx live | ||
import React from 'react'; | ||
import { {{name}} } from '@salutejs/{{package}}'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Note]: package
- название пакета, например caldera
.
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1099/ |
const indexSource = `import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import styled, { createGlobalStyle } from "styled-components"; | ||
import { {{ theme }}__light } from "@salutejs/{{ vertical }}-themes"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Note]:
theme
- конкретное название темы, напримерsdds_serv
vertical
- дизайн вертикаль, напримерplasma
илиsdds
import useIsBrowser from '@docusaurus/useIsBrowser'; | ||
import { usePrismTheme, useColorMode } from '@docusaurus/theme-common'; | ||
import { PlaygroundPreview } from '@salutejs/plasma-docs-ui'; | ||
import { {{ theme }}__dark, {{ theme }}__light } from '@salutejs/{{ vertical }}-themes'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Note]:
theme
- конкретное название темы, напримерsdds_serv
vertical
- дизайн вертикаль, напримерplasma
илиsdds
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в интро не должно быть это либа такая то
токены такие-то
все дела?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Yeti-or Я тогда могу за шаблон взять пример из sdds-serv
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ну в целом мы можем это сделать отдельно, в sdds-serv нужно переписать на plasma-themes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давай тогда в задаче про генерацию содержимого для компонентов
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вы имеете в виду доку? Потому что если вы про либу, то она уже использует sdds-themes пакет
95e3053
to
62cc58f
Compare
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1099/ |
3daeb54
to
6187ff2
Compare
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1099/ |
const { Scaffold } = require('simple-scaffold'); | ||
const path = require('path'); | ||
const { ensureDir } = require('fs-extra'); | ||
const { readdir } = require('node:fs/promises'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
минор
А просто readdirSync не подойдет?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@neretin-trike А какие бенефиты?
6187ff2
to
cb8509a
Compare
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1099/ |
Scaffold docs CLI
What/why changed
Автоматизация развертывания документации для новых пакетов/дизайн вертикалей.
theme
- конкретное название темы, напримерsdds_serv
vertical
- дизайн вертикаль, напримерplasma
илиsdds
url
- что будет в конце URL -plasma.sberdevices.ru/asdk/
Создаст документацию
plasma-asdk-docs
для пакетаplasma-asdk
.