# @tsmugen/utils

> ts-mugen 工具模块

Latest version **1.0.7** (published 2022-10-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tsmugen/utils
pnpm add @tsmugen/utils
yarn add @tsmugen/utils
bun add @tsmugen/utils
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2022-10-12 |
| First published | 2022-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | 破晓雪风 |
| Maintainers | tsmugen |

## Links

- npm: https://www.npmjs.com/package/@tsmugen/utils
- Repository: https://github.com/FiredRice/ts-mugen.git#master
- Homepage: https://github.com/FiredRice/ts-mugen/tree/master/packages/utils
- Issues: https://github.com/FiredRice/ts-mugen/issues
- npm.io page: https://npm.io/package/@tsmugen/utils

## Dependencies (1)

- [@types/chokidar](https://npm.io/package/@types/chokidar.md) ^2.1.3

## Recent versions

- 1.0.7 (latest) — 2022-10-12
- 1.0.6 — 2022-10-10
- 1.0.5 — 2022-10-07

## README

# @tsmugen/utils 使用文档

## 目录
- [介绍](#介绍)<br>
- [API](#API)<br>
- [Interface](#Interface)<br>

## 介绍
`@tsmugen/utils` 为 `@tsmugen/cli` 与 `@tsmugen/core` 依赖的工具包。

## <div id='API'>API</div>
|名称|说明|类型|
|---|---|---|
|createMugenConfig|创建 tsmugen.config.js 中全局配置项的助手函数|(config: [MugenConfig](#MugenConfig)) => [MugenConfig](#MugenConfig)|
|getMugenConfig|获取 tsmugen.config.js 文件中的配置信息|() => [MugenConfig](#MugenConfig)|
|getVersion|获取当前构建中的人物包版本。|() => '1.0' \| '1.1'|

## <div id='Interface'>Interface</div>
**<div id='MugenConfig'>MugenConfig</div>**
```ts
type MugenConfig = {
    // 人物信息
    character: {
        name: string;
        displayname?: string;
        author: string;
        localcoord: [BaseValue, BaseValue];
        palDefaults?: BaseValue[];
    };
    // 监听目录
    rootDir: string;
    // 输出目录
    output: string;
    // 项目入口
    entry: string;
    // 快速启动时缓存的文件夹名
    cacheName?: string;
    // 是否构建变量表
    buildVariableTable?: boolean;
    // 监听配置项
    watchOptions?: WatchOptions;
    // 主程序配置
    programs?: {
        // 主程序别名
        name: string;
        // 主程序版本
        version: '1.0' | '1.1';
        // 主程序绝对路径
        path: string;
    }[];
};
```

---
_Source: https://npm.io/package/@tsmugen/utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
