публичка для того чтобы респонденты проходили опросы
Go to file
nflnkr 06515a64f9 QuizAnswerer component does not fetch data, but receives it as props
WidgetApp and App components fetch quiz data
2024-02-14 14:03:35 +03:00
deployments ci: production preparations 2024-01-31 00:48:18 +03:00
lib QuizAnswerer component does not fetch data, but receives it as props 2024-02-14 14:03:35 +03:00
public Начальное отображение 2023-12-17 16:22:21 +03:00
src QuizAnswerer component does not fetch data, but receives it as props 2024-02-14 14:03:35 +03:00
.dockerignore fix peer dependencies 2024-02-13 16:06:19 +03:00
.eslintrc.cjs disable eslint no-unused-vars for function args 2024-01-29 14:17:11 +03:00
.gitignore fix peer dependencies 2024-02-13 16:06:19 +03:00
.gitlab-ci.yml ci: production preparations 2024-01-31 00:48:18 +03:00
.yarnrc feat: Publication 2023-12-16 17:55:56 +03:00
cypress.config.ts Начальное отображение 2023-12-17 16:22:21 +03:00
Dockerfile ci: production preparations 2024-01-31 00:48:18 +03:00
hub.conf Начальное отображение 2023-12-17 16:22:21 +03:00
index.html название опроса на вкладке либо имя по-умолчанию 2024-01-25 02:52:35 +03:00
package.json publish 1.0.0 2024-02-13 16:14:13 +03:00
pub.js build widget file 2024-02-10 19:27:18 +03:00
README.md fix readme 2024-02-13 16:28:47 +03:00
tsconfig.json move common files to lib folder 2024-02-12 13:58:51 +03:00
tsconfig.node.json migrate to vite 2024-01-19 14:59:35 +03:00
vite.config.package.ts fix peer dependencies 2024-02-13 16:06:19 +03:00
vite.config.ts move common files to lib folder 2024-02-12 13:58:51 +03:00
vite.config.widget.ts fix process being undefined 2024-01-20 18:28:48 +03:00
yarn.lock move common files to lib folder 2024-02-12 13:58:51 +03:00

Виджет

Сборка

yarn build:widget

Использование

<script type="module">
    import widget from "https://s.hbpn.link/export/pub.js";

    widget.create({
        selector: "widget-container",
        quizId: "...",
    })
</script>

Npm-пакет

Перед использованием и публикацией

npm config set //penahub.gitlab.yandexcloud.net/api/v4/packages/npm/:_authToken=INSTANCE_TOKEN
npm config set //penahub.gitlab.yandexcloud.net/api/v4/projects/43/packages/npm/:_authToken=PROJECT_TOKEN

Публикация

  1. Инкрементировать версию в package.json
yarn publish
  1. Нажать enter при запросе версии

Установка

Добавить в корень проекта файл .yarnrc с содержимым

"@frontend:registry" "https://penahub.gitlab.yandexcloud.net/api/v4/packages/npm/"
yarn add @frontend/squzanswerer

Peer dependencies:

yarn add @emoji-mart/data @emoji-mart/react @emotion/react @emotion/styled @mui/icons-material @mui/material @mui/x-date-pickers axios emoji-mart immer moment nanoid notistack react-dom react-error-boundary react-router-dom react swr use-debounce zustand

Использование

import { QuizView } from "@frontend/squzanswerer";

export default function Component() {
    // ...
    return (
        <QuizView quizId={quizId} />
    }
}