open-index/open-npm huggingface dataset:
npm package: @l-l/2dts
Description: api.json转为typescript的类型定义文件
Author: whj1995
Latest version: 0.0.9

# 2dts

api.json转为typescript的类型定义文件

api.json　=> typing.d.ts

## 用法

``` bash
npm install @l-l/2dts
```

1. 命令行使用

``` bash
2dts <path> <output>
```

例如:

``` bash
2dts ./api.json ./typing.d.ts
```

2. 引入包使用

``` js
const todts = require('@l-l/2dts')
const fs = require('fs');

// 读取api.json
const apiJson = JSON.parse(fs.readFileSync('xx/api.json').toString());

// 转换
const dts = todts(apiJson，{
  format: true, // 格式化
  utilType: true // 生成工具类型 
});

// 写
fs.writeFileSync('xx/typing.d.ts',  dts);
```
npm package: @l-l/swagger2
Description: swagger.yml转为api.json标准格式
Author: whj1995
Latest version: 0.0.9

# swagger2

swagger.yml转为api.json标准格式

swagger.yml　=> api.json

## 用法

``` bash
npm install @l-l/swagger2
```

1. 命令行使用

``` bash
swagger2 <path> <output>
```

例如:

``` bash
swagger2 ./swagger.yml ./api.json
```

2. 引入包使用

``` js
const swagger2 = require('@l-l/swagger2')
const fs = require('fs');

// 读取swagger.yml
const swaggeryml = fs.readFileSync('xx/swagger.yml').toString();

// 转换
const api = swagger2(swaggeryml);

// 写
fs.writeFileSync('xx/api.json',  JSON.stringify(api));
```
npm package: @l-l/swagger2dts
Description: swagger.yml转为d.ts类型定义文件
Author: whj1995
Latest version: 0.0.9

# swagger2dts

swagger.yml转为d.ts类型定义文件

swagger.yml　=> typing.d.ts

## 用法

``` bash
npm install @l-l/swagger2dts
```

1. 命令行使用

``` bash
swagger2dts <path> <output>
```

例如:

``` bash
swagger2dts ./swagger.yml ./typing.d.ts
```

2. 引入包使用

``` js
const swagger2dts = require('@l-l/swagger2dts')
const fs = require('fs');

// 读取swagger.yml
const swaggeryml = fs.readFileSync('xx/swagger.yml').toString();

// 转换
const dts = swagger2dts(swaggeryml);

// 写
fs.writeFileSync('xx/typing.d.ts',  dts);
```
npm package: @l-lib/cli
Description: this is a command line to create your project get faster
Author: louis61619
Latest version: 1.0.4

# l-lib

這是一個用於管理 github 倉庫的工具，透過設定檔案快速下載想要使用的模板

## 安裝

```
npm i -g @l-lib/cli
```

## 使用

下載模板

```
l-lib create my-app
```

> 預設只有一個 vue3 的模板

新增模板

```
l-lib add new-repo
```

刪除模板

```
l-lib setup
```

查看本地設置

```
l-lib ls
```

## 修改設定檔

設定檔位於 ~/.l-lib/config.json

```
{
  "path": {
    "vue3-template": "https://github.com/louis61619/vue3-template"
  }
}
```

你可以加入新的倉庫模板，key 是自訂名稱，value 是倉庫地址，請寫在 path 中

---

you can use this cli tools to manage your template on github

## Install

download repo

```
npm i -g @l-lib/cli
```

add new repo config

```
l-lib add new-repo
```

see local config

```
l-lib ls
```

remove local config

```
l-lib setup
```

## Usage

```
l-lib create my-app
```

## Config

if you want to change setting, you can modify setting file in ~/.l-lib

```
{
  "path": {
    "vue3-template": "https://github.com/louis61619/vue3-template"
  }
}
```

repo setting in path, key is cutom name, value is repo path
npm package: @l-lib/elps
Description: this is a component lib base on element-plus
Author: louis
Latest version: 0.0.13

# elp-schema-form

this is a component lib base on element-plus

## how to use

you need confirm you have install [element-plus](https://element-plus.org/zh-CN/)

```
npm i @l-lib/elps
```

then you can copy this code or see docs [example](https://louis61619.github.io/elp-schema-form/)

```vue
<template>
  <Form v-model="modelValue" v-bind="formConfig"></Form>
</template>

<script>
import { ref } from 'vue'
import { Form } from '@l-lib/elps'

export default {
  components: {
    Form
  },
  setup() {
    const modelValue = ref({})

    const formConfig = {
      formOptions: {
        hideRequiredAsterisk: true,
        labelPosition: 'top'
      },
      colLayout: {
        span: 24
      },
      formItems: [
        {
          field: 'email',
          label: 'E-mail',
          placeholder: '請輸入E-mail',
          rules: [
            { required: true, trigger: 'blur', message: 'E-mail是必填內容' },
            {
              type: 'email',
              message: '請輸入正確的郵箱地址',
              trigger: 'blur'
            }
          ]
        },
        {
          field: 'account',
          label: '帳號',
          placeholder: '請輸入帳號',
          rules: [
            { required: true, trigger: 'blur', message: '帳號是必填內容' },
            {
              pattern: /^[0-9]{10}$/,
              message: '帳號必須是10位數字',
              trigger: 'blur'
            }
          ]
        },
        {
          field: 'password',
          label: '密碼',
          type: 'password',
          placeholder: '請輸入密碼',
          rules: [
            { required: true, trigger: 'blur', message: '密碼是必填內容' },
            {
              pattern: /^[0-9]{10}$/,
              message: '密碼必須是10位數字',
              trigger: 'blur'
            }
          ]
        }
      ]
    }

    return {
      modelValue,
      formConfig
    }
  }
}
</script>
```

## test in local

if you want test in local with npm link

you need add this in vue.config.js

```js
const path = require('path')

module.exports = {
  chainWebpack: (config) => {
    config.resolve.symlinks(false)
    config.resolve.alias.set('vue', path.resolve('./node_modules/vue'))
    config.module
      .rule('eslint')
      .exclude.add(/@l-lib/)
      .end()
  }
}
```