@falcon-ui/falcon-ui
v1.2.0
Published
Falcon UI component library for Vue 3 and Element Plus.
Readme
falcon-ui
Monorepo project for secondary packaging around Element Plus.
Code Quality
This repo uses:
eslintfor lint checksprettierfor formatting
Supported file types for lint/format:
.js.ts.tsx.vue
Commands:
pnpm lintrun lint checkspnpm lint:fixauto-fix lint issues when availablepnpm formatformat files in placepnpm format:checkcheck formatting without writing
Commit quality gate:
pre-commitruns format, lint, and unit tests- run
pnpm prepareonce if hooks are not installed yet pnpm precommit:formatformat staged files withlint-stagedpnpm precommit:qualityrunpnpm lint && pnpm test
Git Hook Troubleshooting (Windows)
If commit fails with errors similar to:
env.exe: ... CreateFileMapping ... Win32 error 5bash.exe: ... couldn't create signal pipe, Win32 error 5
This is usually a Git for Windows MSYS runtime permission issue, not a hook script bug.
Run diagnosis:
pnpm doctor:git-hook-env
If diagnosis fails:
- Use the same privilege level for terminal and IDE (do not mix admin/non-admin).
- Reinstall Git for Windows to
C:\\Program Files\\Gitand update PATH. - Add these binaries to your security software allowlist:
Git\\usr\\bin\\env.exe,Git\\usr\\bin\\bash.exe,Git\\usr\\bin\\msys-2.0.dll.- Restart terminal/IDE and rerun
pnpm doctor:git-hook-env.
Play Shell
Use the play shell app for local preview:
npm run devstart the play dev server from repository rootpnpm playstart the play dev serverpnpm play:buildbuild the play app
Play app structure:
play/src/views/home-view.vueplay/src/views/components-view.vueplay/src/views/playground-view.vue
Current component demos in Components page:
FlButtonFlInput
Library Build
Build the distributable package:
pnpm build:librun full build pipeline (Gulp orchestrated)pnpm build:lib:cleancleandist/falcon-uipnpm build:lib:jsbuildesm/cjs/umdpnpm build:lib:typesbuild declaration filespnpm build:lib:stylebuild theme css
Output structure:
dist/falcon-ui/
package.json
global.d.ts
esm/
cjs/
umd/
types/
theme/
index.css
index.scss
src/Third-Party Usage
Install and import in your app:
pnpm add @falcon-ui/falcon-uiUse one of these patterns:
- Local import (usually no extra global typing config needed)
import { FlInput } from '@falcon-ui/falcon-ui'- Global install (register all components)
import { createApp } from 'vue'
import App from './App.vue'
import FalconUI from '@falcon-ui/falcon-ui'
import '@falcon-ui/falcon-ui/theme/index.css'
createApp(App).use(FalconUI).mount('#app')Type Hints Setup (Important)
If you use global install (app.use(FalconUI)), you must add the global
component type entry:
@falcon-ui/falcon-ui/global
Choose one setup method.
Option A: tsconfig.json
{
"compilerOptions": {
"types": ["vite/client", "@falcon-ui/falcon-ui/global"]
}
}Option B: src/env.d.ts
/// <reference types="vite/client" />
/// <reference types="@falcon-ui/falcon-ui/global" />Type Hints Checklist
- Use Volar (
Vue - Official) in VSCode. - After changing types config, run
TypeScript: Restart TS Server. - Confirm template completion works on
<FlInput>and<FlButton>.
For Library Maintainers
When publishing, ensure these type artifacts and exports exist:
dist/falcon-ui/types/falcon-ui/index.d.tsdist/falcon-ui/global.d.tspackage.jsoncontains:typesexports["."]exports["./global"]exports["./components/loading"]exports["./theme/index.css"]
Style override source files are published under dist/falcon-ui/theme/src.
Play Dist Link Mode
Play uses the built package output and pnpm link:
pnpm build:libpnpm link:play:falconpnpm --dir play dev
Or run one command:
pnpm play:dist
