An open API service indexing awesome lists of open source software.

https://github.com/ospoon/web-component-development

基于 Quarkc 跨端组件开发(批量构建模式)
https://github.com/ospoon/web-component-development

Last synced: 12 months ago
JSON representation

基于 Quarkc 跨端组件开发(批量构建模式)

Awesome Lists containing this project

README

          

# Developing Cross-Platform Components Based on Quarkc

With this project, you can create a series of cross-technology stack/frameworkless components of your own.

[中文](./README.md) | English

## Changes

Changes made to `template-quarkc-component-ts` include:
| Number | Description |
| ------ | ---------------------------- |
| 1 | Adjusted `npm run build` to batch build |
| 2 | Added `npm run new` to create components |
| 3 | [Add `unocss` atomic CSS configuration.](https://github.com/OSpoon/web-component-development/tree/unocss/README.md) |
| 4 | Replace the test suite with `@web/test-runnner` |
| 5 | Tuning unit tests directly import component source code |

## Initialization

```
npm install
npm run dev
```

## 1. Generating Components

Generate a component named MyComponent

```
$ npm run new
> web-component-development@0.0.1 new
> plop
? component name please : my-component
✔ ++ /components/MyComponent/index.tsx
✔ ++ /components/MyComponent/index.less
✔ ++ /components/MyComponent/vite-env.d.ts
```

## 2. Using Components

```html



```

## 3. Packaging

```
npm run build
```

The output after packaging is: `dist//index.js` and `dist//index.umd.js`.

```tree
.
├── types
| └── index.d.ts
├── index.js
├── index.umd.js
└── package.json
```

## 4. Verifying Output

Adjust the component path to the packaged output path

```html



```

```html



```

For detailed documentation, please visit: https://quark-ecosystem.github.io/quarkc-docs/#/en-US/docs/publishing