TSBB 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
TSBB 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
TSBB 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 MIT
开发语言 TypeScript
操作系统 跨平台
软件类型 开源软件
所属分类 程序开发常用工具包
开源组织
地区 不详
投 递 者 小弟调调
适用人群 未知
收录时间 2019-07-22

软件简介

tsbb

     

TSBB 是一个零配置 CLI,可帮助您开发,测试和发布现代 TypeScript Node.js 项目。

TypeScript + Babel = TSBB

Features

⏱ 快速初始化示例项目并快速进入开发模式。
♻️ 添加,删除或修改项目文件时重新编译代码。
📚 可读的源代码,鼓励学习和贡献
🚀 更快,更快的编译速度。
⚛️ 支持React组件编译。
⛑ Jest 测试运行,默认为 tsbb test
🔥 零配置,单一依赖。

快速开始

您将需要在系统上安装 Node.js 。

$ npx tsbb create my-project
$ cd my-project

$ npm run watch # Listen compile .ts files.
$ npm run build # compile .ts files.
$ npm start

或者

$ npm install tsbb -g
# Create project
$ tsbb create my-project --example=Express
# --- Example name ----------------┴ˇˇˇˇˇˇ

实例

从其中一个示例初始化项目:

$ npx tsbb create my-app -e <Example Name>
# --- E.g: ----------------┴ˇˇˇˇˇˇˇˇˇˇˇˇˇˇ
# npx tsbb create my-app -e Basic

命令帮助

以下是您可能会发现有用的命令的帮助。

tsbb

▶ tsbb --help
Usage: tsbb [options]

Commands:
  tsbb create <project-name> [options]  Create a new project with TSBB
  tsbb build [options]                  Build your project once and exit.
  tsbb watch [options]                  Recompile files on changes.
  tsbb types [options]                  Create type files for the project.
  tsbb test [options]                   Run jest test runner in watch mode.

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

Examples:

  $ tsbb build            Build your project once and exit.
  $ tsbb watch            Rebuilds on any change.
  $ tsbb test             Run test suites related.
  $ tsbb test --coverage  Test coverage information should be collected

Copyright 2019

tsbb create

▶ tsbb create --help
tsbb create <project-name> [options]

Create a new project with TSBB

Options:
  --version    Show version number                                     [boolean]
  --help, -h   Show help.                                              [boolean]
  --force, -f  force create.                          [boolean] [default: false]
  --example    Example from
               https://github.com/jaywcjlove/tsbb/tree/master/example
               example-path.                         [string] [default: "basic"]

Examples:
  $ tsbb create my-app                    Create my project.
  $ tsbb create my-app --example express  Create an Express example project.

tsbb build

▶ tsbb build --help
tsbb build [options]

Build your project once and exit.

Options:
  --version          Show version number                               [boolean]
  --help, -h         Show help.                                        [boolean]
  --source-root, -s  The root from which all sources are relative.
                                                       [string] [default: "src"]
  --copy-files       When compiling a directory copy over non-compilable files.
                                                       [boolean] [default: true]
  --source-maps      Source Map options.
              [string] [choices: true, "inline", "both", "none"] [default: true]
  --output, -o       Output directory.                 [string] [default: "lib"]
  --target           Specify your target environment.
                           [string] [choices: "react", "node"] [default: "node"]
  --env-name         The name of the 'env' to use when loading configs and
                     plugins. Defaults to the value of 'cjs esm'..
                                                [array] [default: ["cjs","esm"]]
  --comments         decide whether a given comment should be included in the
                     output code.                      [boolean] [default: true]

Examples:
  $ tsbb build                Build your project.
  $ tsbb build --no-comments  Build your project and remove the comments.

tsbb watch

▶ tsbb watch --help
tsbb watch [options]

Recompile files on changes.

Options:
  --version          Show version number                               [boolean]
  --help, -h         Show help.                                        [boolean]
  --source-root, -s  The root from which all sources are relative.
                                                       [string] [default: "src"]
  --copy-files       When compiling a directory copy over non-compilable files.
                                                       [boolean] [default: true]
  --source-maps      Source Map options.
              [string] [choices: true, "inline", "both", "none"] [default: true]
  --output, -o       Output directory.                 [string] [default: "lib"]
  --target           Specify your target environment.
                           [string] [choices: "react", "node"] [default: "node"]
  --env-name         The name of the 'env' to use when loading configs and
                     plugins. Defaults to the value of 'cjs esm'..
                                                [array] [default: ["cjs","esm"]]
  --comments         decide whether a given comment should be included in the
                     output code.                      [boolean] [default: true]
  --timer, -t        Compile interval.                   [number] [default: 300]

Examples:
  $ tsbb watch   Rebuilds on any change.

tsbb test

Runs the test watcher (Jest) in an interactive mode.

▶ tsbb test --help
tsbb test [options]

Run jest test runner in watch mode.

Options:
  --version   Show version number                                      [boolean]
  --help, -h  Show help.                                               [boolean]
  --coverage  Indicates that test coverage information should be collected and
              reported in the output.                 [boolean] [default: false]
  --env       The test environment used for all tests.[string] [default: "node"]
  --config    The path to a Jest config file specifying how to find and execute
              tests.                                                    [string]

Examples:
  $ tsbb test             Run test suites related
  $ tsbb test --coverage  Test coverage information should be collected

tsbb types

▶ tsbb types --help
tsbb types [options]

Create type files for the project.

Options:
  --version                Show version number                         [boolean]
  --help, -h               Show help.                                  [boolean]
  --project                Compile the project given the path to its
                           configuration file, or to a folder with a
                           'tsconfig.json'.             [string] [default: "./"]
  --out-dir                Redirect output structure to the directory.
                                                       [string] [default: "lib"]
  --target                 Specify ECMAScript target version.
        [string] [choices: "ES3", "ES5", "ES2015", "ES2016", "ES2017", "ES2018",
                                         "ES2019", "ESNEXT"] [default: "ES2015"]
  --watch                  Watch input files.         [boolean] [default: false]
  --emit-declaration-only  to enable declarations only output
                                                       [boolean] [default: true]
  --tsconf                 TypeScript other options.                    [string]

Examples:
  $ tsbb types          Create types your project.
  $ tsbb types --watch  Create type files for the project And to run in --watch
                        mode.

License

MIT © Kenny Wong

展开阅读全文

代码

的 Gitee 指数为
超过 的项目

评论

点击引领话题📣 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
0 评论
2 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部