From 3ea532a5b4a6a9caf7bb5028525a6306d60c3f82 Mon Sep 17 00:00:00 2001 From: Sadegh Barati Date: Sun, 12 Nov 2023 09:26:36 +0330 Subject: [PATCH 1/4] fix: set default node version to `18` in CodeSandbox (#164) --- apps/www/.vitepress/theme/utils/codeeditor.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/www/.vitepress/theme/utils/codeeditor.ts b/apps/www/.vitepress/theme/utils/codeeditor.ts index fd3ffe11..00dae457 100644 --- a/apps/www/.vitepress/theme/utils/codeeditor.ts +++ b/apps/www/.vitepress/theme/utils/codeeditor.ts @@ -9,6 +9,9 @@ import { type Style } from '@/lib/registry/styles' export function makeCodeSandboxParams(componentName: string, style: Style, sources: Record) { let files = {} files = constructFiles(componentName, style, sources) + files['.codesandbox/Dockerfile'] = { + content: 'FROM node:18', + } return getParameters({ files, template: 'node' }) } @@ -121,7 +124,7 @@ function constructFiles(componentName: string, style: Style, sources: Record Date: Sun, 12 Nov 2023 00:07:23 -0800 Subject: [PATCH 2/4] docs: add shadcn/vue VSCode extension (#163) * docs(app): #162 add shadcn/vue VSCode extension This pull request is intended to add the shadcn/vue VSCode extension to the installation guide. Closes: #162 * docs: update announcement * docs: credit, and format the text --------- Co-authored-by: zernonia --- apps/www/.vitepress/theme/config/site.ts | 4 ++-- apps/www/src/content/docs/installation.md | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apps/www/.vitepress/theme/config/site.ts b/apps/www/.vitepress/theme/config/site.ts index 7ff16cd4..060adca5 100644 --- a/apps/www/.vitepress/theme/config/site.ts +++ b/apps/www/.vitepress/theme/config/site.ts @@ -15,6 +15,6 @@ export const siteConfig = { export const announcementConfig = { icon: '✨', - title: 'New Toast component', - link: '/docs/components/toast', + title: 'VSCode extension', + link: '/docs/installation.html#vscode-extension', } diff --git a/apps/www/src/content/docs/installation.md b/apps/www/src/content/docs/installation.md index 899f8244..13afcaf3 100644 --- a/apps/www/src/content/docs/installation.md +++ b/apps/www/src/content/docs/installation.md @@ -92,4 +92,16 @@ To configure import aliases, you can use the following `jsconfig.json`: "@/*": ["./*"] } } -} \ No newline at end of file +} +``` + +## VSCode extension + +Install the [shadcn-vue](https://marketplace.visualstudio.com/items?itemName=Selemondev.shadcn-vue) extension by [@selemondev](https://github.com/selemondev) in Visual Studio Code to easily add Shadcn Vue components to your project. + +This extension offers a range of features: +- Ability to initialize the Shadcn Vue CLI +- Install components +- Open documentation +- Navigate to a specific component's documentation page directly from your IDE. +- Handy snippets for quick and straightforward component imports and markup. From c07223a92c16ebd74e294536fedc77ac2a367432 Mon Sep 17 00:00:00 2001 From: Anonimus Programus <7464749+anonimusprogramus@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:13:37 +0700 Subject: [PATCH 3/4] chore: Update DatePicker.vue (#165) unused last line --- apps/www/src/examples/cards/components/DatePicker.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/www/src/examples/cards/components/DatePicker.vue b/apps/www/src/examples/cards/components/DatePicker.vue index b600e78c..8e82644b 100644 --- a/apps/www/src/examples/cards/components/DatePicker.vue +++ b/apps/www/src/examples/cards/components/DatePicker.vue @@ -16,4 +16,3 @@ import { Label } from '@/lib/registry/new-york/ui/label' -@/lib/registry/default/example/DatePickerWithRange.vue From 447b7a021a54a87ba9a4e85ea1291c8969cd9fcc Mon Sep 17 00:00:00 2001 From: zernonia Date: Mon, 13 Nov 2023 17:39:23 +0800 Subject: [PATCH 4/4] fix: devops revert publish pipeline --- .github/workflows/publish.yaml | 42 +++------------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 1a190001..16ebaaec 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -11,37 +11,14 @@ on: - dev paths: - 'apps/www/**' - # Triggers the workflow on pull request event, but only for pull request opened or pull request labeled with "🚀request-deploy" (from forked repo) - # pull_request is not allowed to use secrets, so we use pull_request_target instead (in forked repos) - pull_request_target: - types: - # When a created pull request from forked repo, it will be comment 'Should deploy to add label' - - opened - # When a labeled '🚀request-deploy' pull request from forked repo, it will be deploy to Cloudflare Pages - - labeled - -permissions: - # default contents: read & write (in forked repos, only read) - contents: write - # default deployments: read & write (in forked repos, only read) - deployments: write - # default pull-requests: read & write (in forked repos, only read) - pull-requests: write jobs: publish: runs-on: ubuntu-latest + permissions: + contents: read + deployments: write name: Publish to Cloudflare Pages - if: ${{ - github.event_name == 'push' || - github.event_name == 'workflow_dispatch' || - github.event_name == 'pull_request' || - (github.event_name == 'pull_request_target' && - github.event.action == 'labeled' && - github.event.pull_request.head.repo.fork == true && - contains(github.event.label.name, '🚀request-deploy')) - }} - steps: - name: Checkout uses: actions/checkout@v3 @@ -93,16 +70,3 @@ jobs: # Optional: Change the working directory workingDirectory: apps/www wranglerVersion: '3' - - - name: Remove label - if: ${{ github.event_name == 'pull_request_target' && contains(github.event.label.name, '🚀request-deploy') }} - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: ['🚀request-deploy'] - })