Skip to content
This repository was archived by the owner on Jan 1, 2025. It is now read-only.

Commit a70cd79

Browse files
committed
chore: wip
1 parent b5e3c54 commit a70cd79

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1530
-7736
lines changed

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.9.0
1+
18.10.0

.stacks/.eslintrc-auto-import.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"asyncComputed": true,
99
"author": true,
1010
"autoResetRef": true,
11+
"bcrypt": true,
1112
"beforeAll": true,
1213
"beforeEach": true,
1314
"chai": true,
@@ -39,10 +40,12 @@
3940
"defineComponent": true,
4041
"describe": true,
4142
"docs": true,
43+
"driver": true,
4244
"eagerComputed": true,
4345
"effectScope": true,
4446
"expect": true,
4547
"extendRef": true,
48+
"functions": true,
4649
"functionsLibrary": true,
4750
"getCurrentInstance": true,
4851
"getCurrentScope": true,
@@ -99,7 +102,7 @@
99102
"refThrottled": true,
100103
"refWithControl": true,
101104
"repository": true,
102-
"resetPreset": true,
105+
"reset": true,
103106
"resolveComponent": true,
104107
"resolveRef": true,
105108
"resolveUnref": true,

.stacks/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.nitro
22
.output
33
src/components/.vite-inspect
4+
core/build/entries/*.ts

.stacks/artisan/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "artisan-init",
33
"type": "module",
4-
"version": "0.33.5",
5-
"packageManager": "pnpm@7.12.2",
4+
"version": "0.33.7",
5+
"packageManager": "pnpm@7.13.0",
66
"description": "Artisan core.",
77
"author": "Chris Breuer",
88
"license": "MIT",
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import type { CAC } from 'cac'
2+
import { generateLibEntry } from '../../../core'
3+
import { generateTypes } from '../scripts/generate'
4+
5+
async function generateCommands(artisan: CAC) {
6+
artisan
7+
.command('generate:types', 'Generates the types of & for your library/libraries')
8+
.action(async () => {
9+
await generateTypes()
10+
})
11+
12+
artisan
13+
.command('generate:entries', 'Generates the entry points for your libraries')
14+
.action(async () => {
15+
await generateLibEntry('vue-components')
16+
await generateLibEntry('web-components')
17+
await generateLibEntry('functions')
18+
})
19+
20+
artisan
21+
.command('generate:vue-compatibility', 'Generates Vue 2 & 3 compatibility')
22+
.action(async () => {
23+
// eslint-disable-next-line no-console
24+
console.log('wip')
25+
// await generateVueCompat()
26+
})
27+
}
28+
29+
export { generateCommands }

.stacks/artisan/src/cli/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ import { exampleCommands } from './example'
66
import { testCommands } from './test'
77
import { initCommands } from './init'
88
import { updateCommands } from './update'
9+
import { generateCommands } from './generate'
910

10-
export { devCommands, buildCommands, utilityCommands, makeCommands, exampleCommands, testCommands, initCommands, updateCommands }
11+
export { devCommands, buildCommands, utilityCommands, makeCommands, exampleCommands, testCommands, initCommands, updateCommands, generateCommands }

.stacks/artisan/src/cli/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { resolve } from 'pathe'
66
import { bold, cyan, dim } from 'kolorist'
77
import { useOnline } from '@vueuse/core'
88
import { version } from '../../package.json'
9-
import { isFolder } from '../../../src/core/fs'
9+
import { isFolder } from '../../../core'
1010
import { generate as generateAppKey } from '../scripts/key'
1111
import { ExitCode } from './exit-code'
1212

.stacks/artisan/src/cli/utility.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { reinstallNpmDependencies } from '../scripts/fresh'
33
import { lint, lintFix } from '../scripts/lint'
44
import { release } from '../scripts/release'
55
import { commit } from '../scripts/commit'
6-
import { generateTypes } from '../scripts/generate'
76

87
async function utilityCommands(artisan: CAC) {
98
artisan
@@ -35,12 +34,6 @@ async function utilityCommands(artisan: CAC) {
3534
.action(async () => {
3635
await commit()
3736
})
38-
39-
artisan
40-
.command('generate:types', 'Generates the types of your library/libraries.')
41-
.action(async () => {
42-
await generateTypes()
43-
})
4437
}
4538

4639
export { utilityCommands }

.stacks/artisan/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env node
22
import cac from 'cac'
3-
import { isInitialized } from '../../src/core/helpers'
3+
import { isInitialized } from '../../core'
44
import { version } from '../../../package.json'
5-
import { buildCommands, devCommands, exampleCommands, initCommands, makeCommands, testCommands, updateCommands, utilityCommands } from './cli'
5+
import { buildCommands, devCommands, exampleCommands, generateCommands, initCommands, makeCommands, testCommands, updateCommands, utilityCommands } from './cli'
66
import { ExitCode } from './cli/exit-code'
77
import { generate as generateAppKey } from './scripts/key'
88

@@ -26,6 +26,7 @@ async function main() {
2626
}
2727
else {
2828
await updateCommands(artisan)
29+
await generateCommands(artisan)
2930
await devCommands(artisan)
3031
await buildCommands(artisan)
3132
await utilityCommands(artisan)

.stacks/artisan/src/scripts/build.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
import { resolve } from 'pathe'
22
import Prompts from 'prompts'
33
import consola from 'consola'
4-
import { NpmScript } from '../../../src/types'
5-
import { hasFiles } from '../../../src/core/fs'
4+
import { NpmScript, generateLibEntry, hasFiles } from '../../../core'
65
import { ExitCode } from '../cli/exit-code'
76
import { runNpmScript } from './run-npm-script'
87
import { generateTypes } from './generate'
98

109
const { prompts } = Prompts
1110

1211
export async function buildComponentLibraries() {
12+
await generateLibEntry('vue-components')
13+
await generateLibEntry('web-components')
1314
await buildVueComponentLibrary()
1415
await buildWebComponentLibrary()
1516
}
1617

1718
export async function buildVueComponentLibrary() {
18-
consola.info('Building your component library for production use & npm/CDN distribution...')
19+
consola.info('Building your component library...')
1920

2021
if (hasFiles(resolve(process.cwd(), './components'))) {
2122
try {
@@ -38,10 +39,10 @@ export async function buildWebComponentLibrary() {
3839
if (hasFiles(resolve(process.cwd(), './components'))) {
3940
try {
4041
await runNpmScript(NpmScript.BuildWebComponents)
41-
consola.success('Your web component library was built successfully.')
42+
consola.success('Your Web Component library was built successfully.')
4243
}
4344
catch (error) {
44-
consola.error('There was an error building your web component library.')
45+
consola.error('There was an error building your Web Component library.')
4546
consola.error(error)
4647
}
4748
}

0 commit comments

Comments
 (0)