tsbb

TSBB is a CLI tool for developing, testing and publishing modern TypeScript projects with zero configuration, and can also be used for module or react component development. @tsbbjs

MIT License

Downloads
6.4K
Stars
101
Committers
5

Bot releases are visible (Hide)

tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.1.2

Published by github-actions[bot] over 1 year ago

Documentation v4.1.2: https://raw.githack.com/jaywcjlove/tsbb/205eaeb/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.1.1...v4.1.2

npm i [email protected]
npm i [email protected]
npm init tsbb@latest my-app -- --example typenexus
  • โ›‘ test: update transform file options. 7a06421 @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.1.1

Published by github-actions[bot] over 1 year ago

Documentation v4.1.1: https://raw.githack.com/jaywcjlove/tsbb/394c3be/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.1.0...v4.1.1

npm i [email protected]
npm i [email protected]
npm init tsbb@latest my-app -- --example typenexus
  • ๐ŸŒŸ feat: --use-babel supports outDir config in ts config. bf7ec6f @jaywcjlove
  • ๐ŸŽจ style: add error prompt logs. 3822fc2 @jaywcjlove
  • ๐Ÿž fix(deps): update dependency @babel/preset-env to ~7.21.0 (#440) a0bb654 @renovate-bot
  • ๐Ÿž fix(jest): fix convert svg file import issue. b89279f @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.1.0

Published by github-actions[bot] over 1 year ago

Documentation v4.1.0: https://raw.githack.com/jaywcjlove/tsbb/fe0887f/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.8...v4.1.0

npm i [email protected]
npm i [email protected]
npm init tsbb@latest my-app -- --example typenexus
  • ๐ŸŽจ style: ouptimize output logs. da2c83a @jaywcjlove
  • ๐ŸŒŸ feat: add --bail command parameter. a324d26 @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.8

Published by github-actions[bot] over 1 year ago

Documentation v4.0.8: https://raw.githack.com/jaywcjlove/tsbb/d891524/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.7...v4.0.8

npm i [email protected]
npm i [email protected]
npm init tsbb@latest my-app -- --example typenexus
  • ๐Ÿ’„ chore: update workflows config. cfe784f @jaywcjlove
  • ๐Ÿž fix: fix windows exclude copy file compatibility issue. 8f0ee54 @jaywcjlove
  • ๐Ÿ’„ chore: update workflows config. b9f7773 @jaywcjlove
  • ๐Ÿ’„ chore: update workflows config. ef46425 @jaywcjlove
  • ๐ŸŽจ style: optimize output logs. e8923e0 @jaywcjlove
  • ๐ŸŽจ style: optimize output entry file log. 11c4cff @jaywcjlove
  • ๐Ÿ’„ chore(example): update scripts field in package.json 49ec723 @jaywcjlove
  • ๐ŸŽจ style: output error logs when adding a new command. c3f463d @jaywcjlove
  • ๐Ÿ’„ chore: update workflows config. 6dc32da @jaywcjlove
  • ๐ŸŽจ style: add error prompt for windows. 3888fe8 @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.7

Published by github-actions[bot] over 1 year ago

Documentation v4.0.7: https://raw.githack.com/jaywcjlove/tsbb/801c3fb/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.6...v4.0.7

npm i [email protected]
  • ๐Ÿž fix: fix exclude copying tsconfig.json file issue. 182ae23 @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.6

Published by github-actions[bot] over 1 year ago

Documentation v4.0.6: https://raw.githack.com/jaywcjlove/tsbb/59c10b0/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.5...v4.0.6

npm i [email protected]
  • ๐Ÿž fix: fix JSON modules new feature warning. 322e1c7 @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.5

Published by github-actions[bot] over 1 year ago

Documentation v4.0.5: https://raw.githack.com/jaywcjlove/tsbb/7e9cc06/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.4...v4.0.5

npm i [email protected]
  • ๐Ÿž fix(deps): add missing dependency package @types/jest. ec1587b @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.4

Published by github-actions[bot] over 1 year ago

Documentation v4.0.4: https://raw.githack.com/jaywcjlove/tsbb/f93eda3/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.3...v4.0.4

npm i [email protected]
  • ๐Ÿž fix: test files are not escaped. 1cce5b4 @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.3

Published by github-actions[bot] over 1 year ago

Documentation v4.0.3: https://raw.githack.com/jaywcjlove/tsbb/f99ba6d/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.2...v4.0.3

npm i [email protected]
  • ๐Ÿž fix: fix that files other than js cannot be copied in babel mode. cbd4670 @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.2

Published by github-actions[bot] over 1 year ago

Documentation v4.0.2: https://raw.githack.com/jaywcjlove/tsbb/a992232/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.1...v4.0.2

npm i [email protected]
  • ๐Ÿ†Ž type: fix copy *d.ts issue. 9625b57 @jaywcjlove
  • ๐Ÿ’„ chore: update workflows config. c92da6d @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.1

Published by github-actions[bot] over 1 year ago

Documentation v4.0.1: https://raw.githack.com/jaywcjlove/tsbb/28ce177/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.0...v4.0.1

npm i [email protected]
  • ๐Ÿž fix: fix babel compile cjs issue. fa0d90c @jaywcjlove
  • ๐Ÿ“ˆ perf: optimize babel transform file. 1f0747e @jaywcjlove
  • ๐Ÿ†Ž type(core): fix type errors. b3d6865 @jaywcjlove
tsbb -

Published by github-actions[bot] over 1 year ago

Documentation v4.0.0: https://raw.githack.com/jaywcjlove/tsbb/9963c7e/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.0-alpha.3...v4.0.0
Migrate from tsbb 3.x to 4.x: https://github.com/jaywcjlove/tsbb/issues/439

npm i [email protected]

Updates in version v4

  1. Updated typescript v5 dependency
  2. Updated jest v29 dependency
  3. Refactored feature package management
  4. Refactored create-tsbb based on package internal examples generation
  5. Updated template examples
- tsbb build [options]
+ tsbb build [sourceโ€ฆ] [options]
- --entry, -e
- --emit-type
- --no-emit-type
- --disable-babel
- --no-babel-option
- --file-names, -f
+ --use-babel    Use Babel.(works in babel)
 --source-maps  Enables the generation of sourcemap files.(works in babel)
 --env-name     The current active environment used during configuration loading.(works in babel)
 --esm          Output "esm" directory.(works in babel)
 --cjs          Output "cjs" directory.(works in babel)
- $ tsbb build --file-names src/main.ts --file-names src/good.ts
+ $ tsbb build src/main.ts src/good.ts
- $ tsbb build --entry src/main.ts
+ $ tsbb build src/main.ts
$ tsbb build src/*.ts                   # Build your project.
$ tsbb build src/main.ts src/good.ts    # Specify the entry directory.
$ tsbb build src/*.ts --use-babel --no-source-maps  # No ".js.map" file is generated. (works in babel)
$ tsbb watch src/*.ts --use-babel --cjs ./cjs       # Watch Output directory.
$ tsbb build src/*.ts --use-babel --esm ./es        # Output directory.
$ tsbb build src/*.ts --use-babel --use-vue         # To add Vue JSX support.
$ tsbb test                                         # Run test suites related
$ tsbb test --coverage --bail                       # Test coverage information should be collected
Usage: create-tsbb <app-name> [options] [--help|h]
Options:

  --version, -v Show version number
  --help, -h Displays help information.
-  --output, -o Output directory.
  --example, -e Example from: https://jaywcjlove.github.io/tsbb , default: "basic"
  --force, -f Overwrite target directory if it exists. default: false
-  --path, -p Specify the download target git address. default: "https://jaywcjlove.github.io/tsbb"

TypeScript Project

To configure the tsconfig.json properly, you must first define either the include or files field(s) to specify which files need to be compiled. Once you've done that, you can then specify the outDir for the output directory in the configuration.

{
  "$schema": "http://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "module": "commonjs",
    "target": "esnext",
    "outDir": "./lib",
    "strict": true,
    "skipLibCheck": true
  },
  "include": ["src/**/*"],
  "exclude": [
    "node_modules",
    "**/*.spec.ts"
  ]
}

After completing tsconfig.json configuration, you can configure scripts in package.json:

{
  "scripts": {
    "watch": "tsbb watch",
    "build": "tsbb build"
  },
  "devDependencies": {
    "tsbb": "*"
  }
}

Babel Project

Adding the parameter --use-babel to your project enables babel to compile and output cjs/esm files simultaneously, while ts is only needed for type output.

$ tsbb build "src/*ts" --use-babel

You can change the built-in settings of Babel by adding a .babelrc configuration file. Additionally, you can modify the Babel configurations for esm and cjs separately through environment variables. Please refer to the example below:

{
  "env": {
    "cjs": {
      "presets": ["@babel/preset-typescript"]
    },
    "esm": {
      "presets": ["@babel/preset-env", {
        "modules": false,
        "loose": true,
        "targets": {
          "esmodules": true,
        },
      }]
    }
  } 
}

At compile time, specify the environment variable --envName='xxx' to enable reading of relevant configurations from the settings. This environment variable can also be customized.

{
  "env": {
    "xxx": { ... }
  } 
}
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.0-alpha.3

Published by github-actions[bot] over 1 year ago

Documentation v4.0.0-alpha.3: https://raw.githack.com/jaywcjlove/tsbb/268c852/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.0-alpha.2...v4.0.0-alpha.3

npm i [email protected]
  • ๐Ÿž fix(create-tsbb): update files field in package.json c0f5640 @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.0-alpha.2

Published by github-actions[bot] over 1 year ago

Documentation v4.0.0-alpha.2: https://raw.githack.com/jaywcjlove/tsbb/fbc5cd0/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.0-alpha.1...v4.0.0-alpha.2

npm i [email protected]
  • ๐Ÿž fix: fix create-tsbb example does not exist. 6e932b8 @jaywcjlove
  • ๐Ÿ“– doc: Update README.md 0666a52 @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v4.0.0-alpha.1

Published by github-actions[bot] over 1 year ago

Documentation v4.0.0-alpha.1: https://raw.githack.com/jaywcjlove/tsbb/5aaeff8/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v4.0.0-alpha.0...v4.0.0-alpha.1

npm i [email protected]
  • ๐Ÿ’„ chore: update workflows config. 0c4e8b3 @jaywcjlove
  • ๐Ÿž fix: export @tsbb/babel & @tsbb/jest. 2e2dea1 @jaywcjlove
  • ๐Ÿ“– doc: Update README.md d062e5d @jaywcjlove
  • โ›‘ test: fix test case error. 451cf9b @jaywcjlove
  • ๐Ÿ“„ example(react-component): update example scripts. 86edc59 @jaywcjlove
  • ๐Ÿ“„ example(react-component): update example scripts. df3b3fb @jaywcjlove
  • ๐Ÿ“„ example(react-component): update test case. 01c1cac @jaywcjlove
  • ๐Ÿ“„ example(react-component): update test case. 17364c5 @jaywcjlove
  • ๐Ÿ’„ chore: update workflows config. cf539b3 @jaywcjlove
  • โ›‘ test: update example scripts. f59a6c8 @jaywcjlove
tsbb -

Published by github-actions[bot] over 1 year ago

Documentation v4.0.0-alpha.0: https://raw.githack.com/jaywcjlove/tsbb/81e570f/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v3.7.9...v4.0.0-alpha.0

npm i [email protected]
  • ๐Ÿ refactor: refactor tsbb. 7e770ab @jaywcjlove
  • ๐Ÿ“– doc: Update README.md 7499dba @jaywcjlove
  • ๐Ÿ’„ chore: update workflows config. 71abf7e @jaywcjlove
  • ๐Ÿ’„ chore: update scripts. 9bcd5b3 @jaywcjlove
  • ๐Ÿ’„ chore: update workflows config. afa0151 @jaywcjlove
  • ๐Ÿ’„ chore: update workflows config. 028e948 @jaywcjlove
- tsbb build [options]
+ tsbb build [sourceโ€ฆ] [options]
- --entry, -e
- --emit-type
- --no-emit-type
- --disable-babel
- --no-babel-option
- --file-names, -f
 --env-name
 --esm
 --cjs
$ tsbb build src/*.ts                   # Build your project.
$ tsbb build src/main.ts src/good.ts    # Specify the entry directory.
$ tsbb build src/*.ts --use-babel --no-source-maps  # No ".js.map" file is generated. (works in babel)
$ tsbb watch src/*.ts --use-babel --cjs ./cjs       # Watch Output directory.
$ tsbb build src/*.ts --use-babel --esm ./es        # Output directory.
$ tsbb build src/*.ts --use-babel --use-vue         # To add Vue JSX support.
$ tsbb test                                         # Run test suites related
$ tsbb test --coverage --bail                       # Test coverage information should be collected

TypeScript Project

To configure the tsconfig.json properly, you must first define either the include or files field(s) to specify which files need to be compiled. Once you've done that, you can then specify the outDir for the output directory in the configuration.

{
  "$schema": "http://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "module": "commonjs",
    "target": "esnext",
    "outDir": "./lib",
    "strict": true,
    "skipLibCheck": true
  },
  "include": ["src/**/*"],
  "exclude": [
    "node_modules",
    "**/*.spec.ts"
  ]
}

After completing tsconfig.jso configuration, you can configure scripts in package.json:

{
  "scripts": {
    "watch": "tsbb watch",
    "build": "tsbb build"
  },
  "devDependencies": {
    "tsbb": "*"
  }
}

Babel Project

Adding the parameter --use-babel to your project enables babel to compile and output cjs/esm files simultaneously, while ts is only needed for type output.

$ tsbb build "src/*ts" --use-babel

You can change the built-in settings of Babel by adding a .babelrc configuration file. Additionally, you can modify the Babel configurations for esm and cjs separately through environment variables. Please refer to the example below:

{
  "env": {
    "cjs": {
      "presets": ["@babel/preset-typescript"]
    },
    "esm": {
      "presets": ["@babel/preset-env", {
        "modules": false,
        "loose": true,
        "targets": {
          "esmodules": true,
        },
      }]
    }
  } 
}

At compile time, specify the environment variable --envName='xxx' to enable reading of relevant configurations from the settings. This environment variable can also be customized.

{
  "env": {
    "xxx": { ... }
  } 
}
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v3.7.9

Published by github-actions[bot] almost 2 years ago

Documentation v3.7.9: https://raw.githack.com/jaywcjlove/tsbb/3526d27/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v3.7.8...v3.7.9

npm i [email protected]
  • ๐Ÿ’„ chore: update workflows config. f9598bd @jaywcjlove
  • ๐Ÿ’„ chore: add error output log. d3af411 @jaywcjlove
  • ๐Ÿ“„ example(react-component): update dependencies. 363c4ee @jaywcjlove
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v3.7.8

Published by github-actions[bot] almost 2 years ago

Documentation v3.7.8: https://raw.githack.com/jaywcjlove/tsbb/2d78305/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v3.7.7...v3.7.8

npm i [email protected]
  • ๐Ÿ’„ chore: update workflows config. a240556 @jaywcjlove
  • ๐Ÿž fix(deps): update dependency pg to ~8.8.0 (#429) f73ff06 @renovate-bot
  • ๐Ÿž fix(deps): update dependency typescript to ~4.8.0 (#430) 5f27e51 @renovate-bot
  • ๐Ÿž fix(deps): update dependency lerna to v6 (#434) b687ae5 @renovate-bot
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v3.7.7

Published by github-actions[bot] about 2 years ago

Documentation v3.7.7: https://raw.githack.com/jaywcjlove/tsbb/42ced9c/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v3.7.6...v3.7.7

npm i [email protected]
  • ๐Ÿ’„ chore(deps): update dependency lint-staged to v13 (#420) 8f31710 @renovate-bot
  • ๐Ÿž fix(deps): update dependency lerna to ~5.4.0 (#426) 6a3dfd2 @renovate-bot
  • ๐Ÿ’„ chore(deps): update parcel monorepo to ~2.7.0 (#427) 716518a @renovate-bot
  • ๐Ÿž fix(test): fix can't use 'import.meta' outside a module. 4f06f91 @jaywcjlove
  • ๐Ÿ’„ chore(deps): add babel-plugin-transform-import-meta dependency. aec10c5 @jaywcjlove
  • ๐Ÿž fix(deps): update dependency yargs-parser to ~21.1.0 (#428) 355430b @renovate-bot
  • ๐Ÿž fix(deps): update babel monorepo to ~7.18.0 (#423) 3167d47 @renovate-bot
  • ๐Ÿ’„ chore(deps): update dependency ts-node to ~10.9.0 (#425) 89fadd5 @renovate-bot
  • ๐Ÿ’„ chore(deps): update dependency ts-node-dev to v2 (#421) 6b5ec0d @renovate-bot
tsbb - https://github.com/jaywcjlove/tsbb/releases/tag/v3.7.6

Published by github-actions[bot] over 2 years ago

Documentation v3.7.6: https://raw.githack.com/jaywcjlove/tsbb/fe6ebe2/index.html
Comparing Changes: https://github.com/jaywcjlove/tsbb/compare/v3.7.5...v3.7.6

npm i [email protected]
  • ๐Ÿ’„ chore(deps): update parcel monorepo to ~2.6.0 (#414) f86dcc5 @renovate-bot
  • ๐Ÿž fix(deps): update dependency @types/jest to ~27.5.0 (#408) f258d1e @renovate-bot
  • ๐Ÿž fix(deps): update dependency lerna to v5 (#413) 481f2f5 @renovate-bot
  • ๐Ÿž fix(deps): update dependency prettier to ~2.7.0 (#417) 0abfc72 @renovate-bot
  • ๐Ÿ“„ example: update kkt monorepo to v7.2.0 48936db @jaywcjlove
  • ๐Ÿž fix(deps): update dependency husky to v8 (#409) 983b05b @renovate-bot
  • ๐Ÿ’„ chore(deps): update dependency ts-node to ~10.8.0 (#410) 428ea6b @renovate-bot
  • ๐Ÿž fix(deps): update react monorepo to ~18.2.0 (#418) 8c2281e @renovate-bot
  • ๐Ÿž fix(deps): update dependency @babel/plugin-proposal-decorators to ~7.18.0 (#412) d493b77 @renovate-bot
  • ๐Ÿž fix(deps): update dependency typescript to ~4.7.0 (#411) 230efa0 @renovate-bot
  • ๐Ÿ’„ chore: update workflow config. eeb16d1 @jaywcjlove