tsl-cli-helper
TypeScript icon, indicating that this package has built-in type declarations

2.1.13 • Public • Published

介绍


特性

tsl-cli-helper 为 tsl-cli 服务和能力扩展,支持的能力如下:

  • 支持预编译 vue 组件
  • 支持预编译 ts 文件
  • 支持预编译 less/sass 文件
  • babel preset 的基础配置

支持环境

  • macos
  • windows
  • linux

api

import { style, script, vue, webpack } from "tsl-cli-helper";
// 其它代码

style

  • compileFile(filePath: string, postcssConfig?: postcssrc.Result) => Promise<string>
    • filepath 文件路径
    • postcssConfig: postcss.config 的自定义配置

script

  • compileFile(filePath: string, config?: TransformOptions) => Promise<string>
    • filepath 文件路径
    • config: babel.config 的自定义配置

webpack

  • devServer(type: "studio", config: any)

    • type 项目类型
    • config webpack 配置
  • compile(type: "studio" | "uc" | "library", options: { src?: string; out?: string }, config: any)

    • type 项目类型
    • options 输入输出配置
    • config webpack 配置

Readme

Keywords

Package Sidebar

Install

npm i tsl-cli-helper

Weekly Downloads

5

Version

2.1.13

License

ISC

Unpacked Size

94.5 kB

Total Files

85

Last publish

Collaborators

  • yangxun