Skip to content

Commit

Permalink
Merge branch 'main' of github.com:adolfokrah/visio-cms-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
adolfokrah committed Oct 16, 2024
2 parents accc0e8 + 8068dd3 commit eb7182a
Show file tree
Hide file tree
Showing 79 changed files with 1,089 additions and 570 deletions.
82 changes: 41 additions & 41 deletions .github/workflows/bump-package-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,44 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install dependencies
run: npm install

- name: Bump version
id: bump_version
run: |
current_version=$(jq -r '.version' package.json)
IFS='.' read -r -a version_parts <<< "$current_version"
major=${version_parts[0]}
minor=${version_parts[1]}
patch=${version_parts[2]}
new_patch=$((patch + 1))
new_version="$major.$minor.$new_patch"
jq ".version = \"$new_version\"" package.json > package.tmp.json
mv package.tmp.json package.json
echo "New version: $new_version"
echo "::set-output name=new_version::$new_version"
- name: Commit updated version
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add package.json
git commit -m "Bump version to ${{ steps.bump_version.outputs.new_version }}"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Trigger Release components package workflow
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: create-tag-release
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install dependencies
run: npm install

- name: Bump version
id: bump_version
run: |
current_version=$(jq -r '.version' package.json)
IFS='.' read -r -a version_parts <<< "$current_version"
major=${version_parts[0]}
minor=${version_parts[1]}
patch=${version_parts[2]}
new_patch=$((patch + 1))
new_version="$major.$minor.$new_patch"
jq ".version = \"$new_version\"" package.json > package.tmp.json
mv package.tmp.json package.json
echo "New version: $new_version"
echo "::set-output name=new_version::$new_version"
- name: Commit updated version
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add package.json
git commit -m "Bump version to ${{ steps.bump_version.outputs.new_version }}"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Trigger Release components package workflow
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: create-tag-release
8 changes: 4 additions & 4 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Create Release

on:
repository_dispatch:
repository_dispatch:
types: [create-tag-release]

jobs:
Expand Down Expand Up @@ -41,14 +41,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ env.VERSION }}"
release_name: "v${{ env.VERSION }}"
tag_name: 'v${{ env.VERSION }}'
release_name: 'v${{ env.VERSION }}'
body: |
## Changes
$(git log --oneline $(git describe --tags --abbrev=0)..HEAD)
draft: false
prerelease: false

- name: Trigger Release components package workflow
uses: peter-evans/repository-dispatch@v2
with:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release-npm.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Release components package

on:
repository_dispatch:
repository_dispatch:
types: [create-npm-package]

jobs:
Expand All @@ -10,10 +10,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Reconfigure git to use HTTP authentication
run:
git config --global url."https://github.com/".insteadOf
run: git config --global url."https://github.com/".insteadOf
ssh://[email protected]/

- name: Install Node.js
Expand All @@ -25,7 +24,7 @@ jobs:

- name: Install dependencies
run: npm ci

- name: Build package
run: npm run build

Expand Down
16 changes: 8 additions & 8 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 120,
"bracketSpacing": true,
"endOfLine": "lf"
}
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 120,
"bracketSpacing": true,
"endOfLine": "lf"
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
npm install
npm run build
```

78 changes: 2 additions & 76 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "visio-cms-lib",
"private": false,
"version": "0.1.186",
"version": "0.1.213",
"type": "module",
"main": "./dist/main.umd.js",
"module": "./dist/main.es.js",
Expand Down Expand Up @@ -34,6 +34,10 @@
"import": "./dist/components/exposed-components/list/index.es.js",
"types": "./dist/components/exposed-components/list/index.d.ts"
},
"./Slot": {
"import": "./dist/components/exposed-components/slot/index.es.js",
"types": "./dist/components/exposed-components/slot/index.d.ts"
},
"./utils": {
"import": "./dist/exposedFunctions.es.js",
"types": "./dist/exposedFunctions.d.ts"
Expand Down Expand Up @@ -92,7 +96,6 @@
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "^3.6.0",
"html-react-parser": "^5.1.15",
"jose": "^5.6.3",
"lodash": "^4.17.21",
"lucide-react": "^0.417.0",
Expand Down
42 changes: 2 additions & 40 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,11 @@
import { Cms } from './components';
import blocks from './components/blocks';
import './styles/tailwind.css';
import TestLivePage from './TestLivePage';

import visioConfig from '../visio.config';
function App() {
const path = window.location.pathname;
if (path.includes('cms')) {
return (
<Cms
path={path}
allowImageTransformation={false}
blocks={blocks}
defaultLanguage={{
language: 'English',
locale: 'en-us',
}}
supportedLanguages={[
{
language: 'English',
locale: 'en-us',
},
{
language: 'Spanish',
locale: 'es',
},
{
language: 'French',
locale: 'fr',
},
{
language: 'German',
locale: 'de',
},
{
language: 'Finish',
locale: 'fi',
},
]}
emailSender="Visio cms <[email protected]>"
projectId="urhvrfatpmdbwttotlwc"
supabaseProjectUrl="https://urhvrfatpmdbwttotlwc.supabase.co"
supabaseAnonKey="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVyaHZyZmF0cG1kYnd0dG90bHdjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjI0MTIyNDAsImV4cCI6MjAzNzk4ODI0MH0.6oTSoUtEAVdSxUa4ws9PgXEnHCiFCsgXTawwbtOBDh8"
unsplashAccessKey="Rw6b_NBqAXZV4wTUOF7A2QtagLtB9apC2dQYZco1RUU"
/>
);
return <Cms path={path} {...visioConfig} />;
}
return <TestLivePage />;
}
Expand Down
Loading

0 comments on commit eb7182a

Please sign in to comment.