Skip to content

Commit 6f6df7f

Browse files
committed
chore: wip
1 parent 2a71421 commit 6f6df7f

File tree

10 files changed

+210
-254
lines changed

10 files changed

+210
-254
lines changed

.stacks/auto-imports.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ declare global {
206206
const usePointer: typeof import('@vueuse/core')['usePointer']
207207
const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
208208
const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
209+
const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast']
209210
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
210211
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
211212
const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
@@ -484,6 +485,7 @@ declare module '@vue/runtime-core' {
484485
readonly usePointer: UnwrapRef<typeof import('@vueuse/core')['usePointer']>
485486
readonly usePointerSwipe: UnwrapRef<typeof import('@vueuse/core')['usePointerSwipe']>
486487
readonly usePreferredColorScheme: UnwrapRef<typeof import('@vueuse/core')['usePreferredColorScheme']>
488+
readonly usePreferredContrast: UnwrapRef<typeof import('@vueuse/core')['usePreferredContrast']>
487489
readonly usePreferredDark: UnwrapRef<typeof import('@vueuse/core')['usePreferredDark']>
488490
readonly usePreferredLanguages: UnwrapRef<typeof import('@vueuse/core')['usePreferredLanguages']>
489491
readonly usePreferredReducedMotion: UnwrapRef<typeof import('@vueuse/core')['usePreferredReducedMotion']>

.stacks/bin/artisan.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

.stacks/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@
4343
"module": "dist/index.js",
4444
"types": "dist/index.d.ts",
4545
"bin": {
46-
"artisan": "bin/artisan.js"
46+
"artisan": "./dist/cli/index.mjs"
4747
},
4848
"files": [
49-
"bin",
5049
"dist",
5150
"scripts"
5251
],
@@ -55,14 +54,14 @@
5554
"pnpm": ">=7.9.5"
5655
},
5756
"scripts": {
57+
"artisan": "jiti ./src/cli/index.ts",
5858
"dev:components": "vite serve ./src/components -c ./src/config/components.ts",
5959
"build:components": "vite build -c ./src/config/components.ts",
6060
"build:elements": "vite build -c ./src/config/elements.ts",
61-
"examples:vue": "vite serve ./examples/vue -c ./src/config/example-vue.ts",
61+
"examples:vue": "pnpm run build:components && vite serve ./examples/vue -c ./src/config/example-vue.ts",
6262
"build:functions": "vite build -c ./src/config/functions.ts",
6363
"build:cli": "vite build -c ./src/config/cli.ts",
6464
"build:stacks": "vite -c ./src/config/stacks.ts needed for our starter kits",
65-
"artisan": "esno ./src/cli/run.ts",
6665
"nitro:build": "nitro build",
6766
"make:component": "wip",
6867
"make:function": "wip",
@@ -90,7 +89,7 @@
9089
"test:coverage": "cd .. && vitest run --coverage",
9190
"test:types": "vue-tsc --noEmit",
9291
"types:fix": "esno scripts/fix-types.ts",
93-
"preinstall": "esno scripts/check-for-pnpm.ts && esno scripts/check-node-version.ts",
92+
"preinstall": "esno scripts/check-node-version.ts",
9493
"postinstall": "npx simple-git-hooks ../config/git-hooks.ts"
9594
},
9695
"dependencies": {
@@ -136,6 +135,7 @@
136135
"detect-indent": "^7.0.0",
137136
"detect-newline": "^4.0.0",
138137
"events": "^3.3.0",
138+
"jiti": "^1.14.0",
139139
"vitepress": "1.0.0-alpha.10"
140140
}
141141
}

.stacks/scripts/check-for-pnpm.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

.stacks/scripts/check-node-version.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ async function main() {
1414
'\n',
1515
'⚠️ \u001B[33mThis package requires your Node.js version to be `>=16`'
1616
+ ' to work properly.\u001B[39m',
17-
'\n\n1. Install Volta to automatically manage it by running: \x1B[1mcurl https://get.volta.sh | bash\x1B[0m',
18-
'\n2. Install Node.js by running: \x1B[1mvolta install node@16\x1B[0m',
19-
'\n3. Done! Run `npm` commands as usual and it\'ll just work :)',
20-
'\n\nSee \x1B[1mhttps://volta.sh\x1B[0m for more information.',
17+
'\n\n1. Install nvm to automatically manage it by running: \x1B[1mcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash\x1B[0m',
18+
'\n2. When you change your directory to your Stacks project, it will automatically install the proper Node.js version\x1B[0m',
19+
'\n3. Enable corepack: \x1B[1mcorepack enable\x1B[0m',
20+
'\n4. Done! Run any `pnpm` commands as usual and it\'ll just work :)',
21+
'\n\nSee \x1B[1mhttps://github.com/nvm-sh/nvm\x1B[0m for more information.',
2122
'\n',
2223
)
2324

.stacks/src/cli/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { ExitCode } from './exit-code'
99
*
1010
* @param args - The command-line arguments (e.g. ["dev", "dev -c", "dev:components"])
1111
*/
12-
export async function main(): Promise<void> {
12+
async function main() {
1313
try {
1414
const cli = cac('artisan')
1515

@@ -73,3 +73,5 @@ function errorHandler(error: Error): void {
7373
console.error(message)
7474
process.exit(ExitCode.FatalError)
7575
}
76+
77+
main()

.stacks/src/cli/run.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

.stacks/src/components/library.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// todo: this file needs to be auto-generated
2-
export { default as Counter } from 'components/Counter.vue'
3-
export { default as HelloWorld } from 'components/HelloWorld.vue'
2+
export { default as Counter } from '../../../components/Counter.vue'
3+
export { default as HelloWorld } from '../../../components/HelloWorld.vue'

commitlint.config.cjs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
const { readdirSync } = require('fs')
22
const { resolve } = require('path')
33
const configPath = resolve(__dirname, './config/git.ts')
4-
// const { paramCase } = require('change-case')
4+
const { paramCase } = require('change-case')
55
const jiti = require('jiti')(configPath, { debug: true })
66

7-
// const components = readdirSync(resolve(__dirname, './components'))
8-
// .map(item => paramCase(item.replace(/.vue/g, '')))
7+
const components = readdirSync(resolve(__dirname, './components'))
8+
.map(item => paramCase(item.replace(/.vue/g, '')))
99

10-
// const functions = readdirSync(resolve(__dirname, './functions'))
11-
// .map(item => paramCase(item.replace(/.ts/g, '')))
10+
const functions = readdirSync(resolve(__dirname, './functions'))
11+
.map(item => paramCase(item.replace(/.ts/g, '')))
1212

13-
const scopes = ['', 'ci', 'core', 'config', 'deps', 'docs', 'dx', 'example', 'play', 'release', 'readme', 'build']
14-
// const scopes = ['', 'ci', 'core', 'config', 'deps', 'docs', 'dx', 'example', 'play', 'release', 'readme', 'build', ...components, ...functions]
13+
const scopes = ['', 'ci', 'core', 'config', 'deps', 'docs', 'dx', 'example', 'play', 'release', 'readme', 'build', ...components, ...functions]
1514
const uniqueScopes = [...new Set(scopes)]
1615

1716
module.exports = {

0 commit comments

Comments
 (0)