0.0.9 • Published 5 years ago

lnc-cli v0.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

简单的打包工具,

用于将模块代码打包成单文件。 支持多入口及 typescript。

使用方法

  • 一次性打包:
lnc --debug

入口文件默认为 server/*.[ts|js],
输出文件夹默认为 build

  • watch 模式
lnc --debug --watch

可配置项

配置项可以写在 命令的参数里,
也可以在项目的目录下新建一个 lnc.json

例如: lnc.json

{
    "debug": true,
    "entry": ["server/*"],
    "exclude": "assert",
    "ignoreError": false,
    "output": "build",
    "tsconfigPath": "build-in",
    "watch": false
}
tsConfigPath
tsConfigPath
说明指定使用非根目录下的tsconfig.json
是否可选
默认值-
其它
针对 tsconfig.json

其中

  • outDir, module 可任意指定
  • allowJs 可为 或者 true
  • target 推荐为 es6
其它
  • 目前存在的一个BUG:
    安装npm依赖的时候,需要临时退出lnc,否则会出现性能问题。