bfehub / vlib-starter Goto Github PK
View Code? Open in Web Editor NEWVue3 组件库开发模板 & Vue3 组件库次佳实践指南。
Home Page: https://juejin.cn/column/7130951037547970567
License: MIT License
Vue3 组件库开发模板 & Vue3 组件库次佳实践指南。
Home Page: https://juejin.cn/column/7130951037547970567
License: MIT License
例如以下代码片段,都用到了 vant
,然而通用组件库模板的话,不可能大家都会依赖 vant
,建议用到的一些方法将其抽到 utils
使其可以脱离 vant
应该好一点
import { withInstall } from 'vant/es/utils'
import _Form from './src/form.vue'
export const Form = withInstall(_Form)
export default Form
export * from './src/props'
和
import { makeStringProp } from 'vant/es/utils'
import type { ExtractPropTypes } from 'vue'
export const formProps = {
/**
* 类型定义
*/
type: makeStringProp(''),
}
export type FormProps = ExtractPropTypes<typeof formProps>
PS D:\workspace_vscode\vlib-starter> pnpm ui:build
> @bfehub/[email protected] ui:build D:\workspace_vscode\vlib-starter
> pnpm --filter=vlib-ui build
> @bfehub/[email protected] build D:\workspace_vscode\vlib-starter\packages\vlib-ui
> gulp --require @esbuild-kit/cjs-loader -f scripts/build/index.ts
[19:57:17] Requiring external module @esbuild-kit/cjs-loader
[19:57:17] Working directory changed to D:\workspace_vscode\vlib-starter\packages\vlib-ui\scripts\build
[19:57:33] Using gulpfile D:\workspace_vscode\vlib-starter\packages\vlib-ui\scripts\build\index.ts
[19:57:33] Starting 'default'...
[19:57:33] Starting 'clean'...
[19:57:33] Finished 'clean' after 5.37 ms
[19:57:33] Starting 'buildModules'...
[19:57:33] Starting 'buildFull'...
[19:57:33] Starting 'buildStyle'...
[19:57:33] Starting 'generateTypes'...
[19:57:33] Starting 'generateHelper'...
[19:57:33] Finished 'generateHelper' after 34 ms
[19:57:34] The following tasks did not complete: default, <parallel>, buildModules, buildFull, buildStyle, generateTypes
[19:57:34] Did you forget to signal async completion?
node:internal/fs/utils:347
throw err;
^
Error: ENOENT: no such file or directory, open 'D:\workspace_vscode\vlib-starter\packages\vlib-ui\dist\tags.json'
at Object.openSync (node:fs:601:3)
at Object.writeFileSync (node:fs:2249:35)
at <anonymous> (d:\workspace_vscode\vlib-starter\node_modules\.pnpm\[email protected]\node_modules\components-helper\lib\index.js:568:12)
at FSReqCallback.oncomplete (node:fs:198:23)
at FSReqCallback.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'D:\\workspace_vscode\\vlib-starter\\packages\\vlib-ui\\dist\\tags.json'
}
Node.js v18.16.1
D:\workspace_vscode\vlib-starter\packages\vlib-ui:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @bfehub/[email protected] build: `gulp --require @esbuild-kit/cjs-loader -f scripts/build/index.ts`
Exit status 1
ELIFECYCLE Command failed with exit code 1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.