mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
chore(deps): switch to pnpm (#228)
This commit is contained in:
39
.github/workflows/ci-dev.yml
vendored
39
.github/workflows/ci-dev.yml
vendored
@@ -22,30 +22,41 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
- name: Checkout
|
||||
- name: checkout
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
||||
version: 7
|
||||
run_install: false
|
||||
|
||||
- name: Dependencies
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: yarn
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
run: pnpm run lint
|
||||
|
||||
- name: Typecheck
|
||||
run: yarn typecheck
|
||||
run: pnpm run typecheck
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
run: pnpm run build
|
||||
|
||||
- name: Release Edge
|
||||
if: github.event_name == 'push'
|
||||
|
||||
39
.github/workflows/ci.yml
vendored
39
.github/workflows/ci.yml
vendored
@@ -22,30 +22,41 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
- name: Checkout
|
||||
- name: checkout
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
||||
version: 7
|
||||
run_install: false
|
||||
|
||||
- name: Dependencies
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: yarn
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
run: pnpm run lint
|
||||
|
||||
- name: Typecheck
|
||||
run: yarn typecheck
|
||||
run: pnpm run typecheck
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
run: pnpm run build
|
||||
|
||||
- name: Version Check
|
||||
id: check
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
// @ts-expect-error
|
||||
import { transformContent } from '@nuxt/content/transformers'
|
||||
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const props = defineProps({
|
||||
slug: {
|
||||
type: String,
|
||||
@@ -84,11 +85,13 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const baseProps = reactive({ ...props.baseProps })
|
||||
const componentProps = reactive({ ...props.props })
|
||||
|
||||
const appConfig = useAppConfig()
|
||||
const route = useRoute()
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const slug = props.slug || route.params.slug[1]
|
||||
const camelName = useCamelCase(slug)
|
||||
const name = `U${useUpperFirst(camelName)}`
|
||||
@@ -97,6 +100,7 @@ const meta = await fetchComponentMeta(name)
|
||||
|
||||
// Computed
|
||||
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const ui = computed(() => ({ ...appConfig.ui[camelName], ...props.ui }))
|
||||
|
||||
const fullProps = computed(() => ({ ...props.baseProps, ...componentProps }))
|
||||
@@ -128,6 +132,7 @@ const propsToSelect = computed(() => Object.keys(componentProps).map((key) => {
|
||||
}
|
||||
}).filter(Boolean))
|
||||
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const code = computed(() => {
|
||||
let code = `\`\`\`html
|
||||
<${name}`
|
||||
|
||||
@@ -15,6 +15,7 @@ const props = defineProps({
|
||||
|
||||
const appConfig = useAppConfig()
|
||||
const route = useRoute()
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const slug = props.slug || route.params.slug[1]
|
||||
const camelName = useCamelCase(slug)
|
||||
const name = `U${useUpperFirst(camelName)}`
|
||||
|
||||
@@ -43,6 +43,7 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const slug = props.slug || route.params.slug[1]
|
||||
const camelName = useCamelCase(slug)
|
||||
const name = `U${useUpperFirst(camelName)}`
|
||||
|
||||
@@ -26,6 +26,7 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
const slug = props.slug || route.params.slug[1]
|
||||
const camelName = useCamelCase(slug)
|
||||
const name = `U${useUpperFirst(camelName)}`
|
||||
|
||||
@@ -17,6 +17,7 @@ export default defineNuxtConfig({
|
||||
highlight: {
|
||||
theme: {
|
||||
light: 'material-lighter',
|
||||
default: 'material-default',
|
||||
dark: 'material-palenight'
|
||||
},
|
||||
preload: ['json', 'js', 'ts', 'html', 'css', 'vue', 'diff', 'shell', 'markdown', 'yaml', 'bash', 'ini']
|
||||
@@ -35,5 +36,13 @@ export default defineNuxtConfig({
|
||||
},
|
||||
generate: {
|
||||
routes: ['/getting-started']
|
||||
},
|
||||
componentMeta: {
|
||||
metaFields: {
|
||||
props: true,
|
||||
slots: false,
|
||||
events: false,
|
||||
exposed: false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
19
package.json
19
package.json
@@ -18,20 +18,21 @@
|
||||
"node": ">=16.14.0"
|
||||
},
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"build": "nuxt-module-build",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "pnpm build",
|
||||
"dev": "nuxi dev docs",
|
||||
"build:docs": "nuxi generate docs",
|
||||
"lint": "eslint .",
|
||||
"typecheck": "nuxi typecheck",
|
||||
"prepare": "nuxi prepare docs",
|
||||
"release": "yarn lint && standard-version && git push --follow-tags"
|
||||
"release": "pnpm lint && standard-version && git push --follow-tags"
|
||||
},
|
||||
"dependencies": {
|
||||
"@egoist/tailwindcss-icons": "^1.0.7",
|
||||
"@headlessui/vue": "1.7.10",
|
||||
"@iconify-json/heroicons": "^1.1.10",
|
||||
"@nuxt/kit": "^3.4.3",
|
||||
"@nuxt/kit": "^3.5.1",
|
||||
"@nuxtjs/color-mode": "^3.2.0",
|
||||
"@nuxtjs/tailwindcss": "^6.7.0",
|
||||
"@popperjs/core": "^2.11.7",
|
||||
@@ -47,19 +48,19 @@
|
||||
"tailwindcss": "^3.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/simple-icons": "^1.1.53",
|
||||
"@iconify-json/simple-icons": "^1.1.54",
|
||||
"@nuxt/content": "^2.6.0",
|
||||
"@nuxt/devtools": "^0.4.6",
|
||||
"@nuxt/devtools": "^0.5.5",
|
||||
"@nuxt/eslint-config": "^0.1.1",
|
||||
"@nuxt/module-builder": "^0.3.1",
|
||||
"@nuxthq/studio": "^0.12.1",
|
||||
"@nuxtjs/plausible": "^0.2.1",
|
||||
"@types/lodash-es": "^4.17.7",
|
||||
"@types/node": "^20.1.7",
|
||||
"@types/node": "^20.2.4",
|
||||
"@vueuse/nuxt": "^10.1.2",
|
||||
"eslint": "^8.40.0",
|
||||
"nuxt": "^3.4.3",
|
||||
"nuxt-component-meta": "^0.5.2",
|
||||
"eslint": "^8.41.0",
|
||||
"nuxt": "^3.5.1",
|
||||
"nuxt-component-meta": "^0.5.3",
|
||||
"nuxt-lodash": "^2.4.1",
|
||||
"standard-version": "^9.5.0",
|
||||
"unbuild": "^1.2.1",
|
||||
|
||||
10095
pnpm-lock.yaml
generated
Normal file
10095
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
import { createSharedComposable, useActiveElement } from '@vueuse/core'
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import type {} from '@vueuse/shared'
|
||||
|
||||
export const _useShortcuts = () => {
|
||||
const macOS = computed(() => process.client && navigator && navigator.userAgent && navigator.userAgent.match(/Macintosh;/))
|
||||
|
||||
Reference in New Issue
Block a user