feat: 初始化
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
node_modules/
|
||||
test/*/
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = { extends: ['@commitlint/config-conventional'] };
|
||||
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Example</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="./src/main.ts" type="module"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "@lz-space/example",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"dev": "vite"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@lz-space/components": "workspace:^"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div class="">hello example</div>
|
||||
<LzButton>LzButton🍊</LzButton>
|
||||
<JsxButton>JsxButton🍊</JsxButton>
|
||||
pnpm add @lz-space/components --workspace
|
||||
</template>
|
||||
<script lang="ts" setup name="App"></script>
|
||||
@@ -0,0 +1,8 @@
|
||||
import { createApp } from "vue";
|
||||
import App from "./App.vue";
|
||||
import LzUI from "@lz-space/components";
|
||||
// createApp(App).mount("#app");
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(LzUI);
|
||||
app.mount("#app");
|
||||
@@ -0,0 +1,7 @@
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue(), vueJsx()],
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "lz-space",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"postinstall": "husky install",
|
||||
"commit": "cz"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"vue": "^3.4.37"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.4.0",
|
||||
"@commitlint/config-conventional": "^19.2.2",
|
||||
"@vitejs/plugin-vue": "^5.1.2",
|
||||
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
||||
"commitizen": "^4.3.0",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"husky": "^9.1.4",
|
||||
"vite": "^5.4.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
import LzButton from "./src/Button.vue";
|
||||
export default LzButton;
|
||||
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<button>
|
||||
<slot>Lz按钮</slot>
|
||||
</button>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
defineOptions({ name: "LzButton" });
|
||||
</script>
|
||||
@@ -0,0 +1,11 @@
|
||||
import { App } from "vue";
|
||||
import JsxButton from "./jsxButton";
|
||||
import LzButton from "./LzButton";
|
||||
|
||||
export { JsxButton, LzButton };
|
||||
export default {
|
||||
install(app: App) {
|
||||
app.component(JsxButton.name, JsxButton);
|
||||
app.component(LzButton.name, LzButton);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
import JsxButton from "./src/Button";
|
||||
export default JsxButton;
|
||||
@@ -0,0 +1,8 @@
|
||||
import { defineComponent } from "vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "JsxButton",
|
||||
setup(props, context) {
|
||||
return () => <button>{context.slots.default?.()}</button>;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "@lz-space/components",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"private": "true",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
||||
Generated
+2801
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
packages:
|
||||
# packages 目录下的所有次级目录
|
||||
- "packages/**"
|
||||
# 测试文件夹
|
||||
- "example"
|
||||
# 文档目录
|
||||
- "docs"
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
declare module "*.vue" {
|
||||
import { DefineComponent } from "vue";
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
export default component;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"jsx": "preserve"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user