0.0.1 • Published 3 years ago
fzn-quark-demo v0.0.1
Quark-Template
为@quarkd/core
使用生成的模板文件,其中入口文件为main.tsx
,使用vite进行开发时的构建,生产使用rollup进行打包。
其中main.tsx
为使用@quarkd/core
书写的自定义组件,打包后会在目录下生成lib/index.js
文件。
这里我们在Vue
或者React
项目中,引入组件的方式为import quark-demo/lib/index.js
。其中组件的tag名称为自定组件的名称。
@customElement({
tag: 'my-component',
style,
})
在Vue
或者React
中使用
<my-component />
项目启动
- npm i
- npm run dev
项目打包
npm run build
0.0.1
3 years ago