From b9af7776393e0284ee409bef3390530f4b53f975 Mon Sep 17 00:00:00 2001 From: Nikita Yutanov Date: Fri, 25 Aug 2023 16:45:14 +0300 Subject: [PATCH] Fix Vara UI publish (#1358) Co-authored-by: Dmitry Osipov --- .github/workflows/CI-CD-gear-ui.yml | 16 ---------------- utils/vara-ui/README.md | 8 ++++++++ utils/vara-ui/package-lock.json | 4 ++-- utils/vara-ui/package.json | 6 ++++-- 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/CI-CD-gear-ui.yml b/.github/workflows/CI-CD-gear-ui.yml index 9c5ae76626..d50ad63fed 100644 --- a/.github/workflows/CI-CD-gear-ui.yml +++ b/.github/workflows/CI-CD-gear-ui.yml @@ -73,22 +73,6 @@ jobs: - name: "Checkout" uses: actions/checkout@v2 - - name: "Check changed files" - shell: pwsh - id: check_file_changed - run: | - # Diff HEAD with the previous commit - $diff = git diff --name-only HEAD^ HEAD - # Check if a file under gear-ui has changed (added, modified, deleted) - $SourceDiffGearUI = $diff | Where-Object { $_ -match '^utils/gear-ui/' } - $HasDiffGearUI = $SourceDiffGearUI.Length -gt 0 - $SourceDiffVaraUI = $diff | Where-Object { $_ -match '^utils/vara-ui/' } - $HasDiffVaraUI = $SourceDiffVaraUI.Length -gt 0 - # Set the output - Write-Host "::set-output name=gearui_changed::$HasDiffGearUI" - Write-Host "::set-output name=varaui_changed::$HasDiffVaraUI" - - - name: Use node 18.x uses: actions/setup-node@v2.1.5 with: diff --git a/utils/vara-ui/README.md b/utils/vara-ui/README.md index bde4864be5..1357d672f7 100644 --- a/utils/vara-ui/README.md +++ b/utils/vara-ui/README.md @@ -14,6 +14,8 @@ A React library that provides components that are used across Vara applications. ## Installation +Install package: + ```sh npm install @gear-js/vara-ui ``` @@ -24,6 +26,12 @@ or yarn add @gear-js/vara-ui ``` +Import styles in application's root: + +```jsx +import '@gear-js/vara-ui/styles.css'; +``` + ## Getting started Simple as it is, here's quick example: diff --git a/utils/vara-ui/package-lock.json b/utils/vara-ui/package-lock.json index b7cc2ca186..e050df4b04 100644 --- a/utils/vara-ui/package-lock.json +++ b/utils/vara-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gear-js/vara-ui", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@gear-js/vara-ui", - "version": "0.0.1", + "version": "0.0.2", "license": "GPL-3.0", "devDependencies": { "@storybook/addon-essentials": "7.2.1", diff --git a/utils/vara-ui/package.json b/utils/vara-ui/package.json index dfb5e17944..36ad4ed75a 100644 --- a/utils/vara-ui/package.json +++ b/utils/vara-ui/package.json @@ -1,6 +1,6 @@ { "name": "@gear-js/vara-ui", - "version": "0.0.1", + "version": "0.0.2", "type": "module", "description": "React UI components used across Vara applications", "author": "Gear Technologies", @@ -55,5 +55,7 @@ }, "files": [ "dist" - ] + ], + "main": "dist/vara-ui.js", + "types": "dist/index.d.ts" }