Releases: jaywcjlove/tsbb
v4.0.2
Documentation v4.0.2: https://raw.githack.com/jaywcjlove/tsbb/a992232/index.html
Comparing Changes: v4.0.1...v4.0.2
npm i [email protected]
- 🆎 type: fix copy *d.ts issue. 9625b57 @jaywcjlove
- 💄 chore: update workflows config. c92da6d @jaywcjlove
v4.0.1
Documentation v4.0.1: https://raw.githack.com/jaywcjlove/tsbb/28ce177/index.html
Comparing Changes: 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
v4.0.0-alpha.3
Documentation v4.0.0-alpha.3: https://raw.githack.com/jaywcjlove/tsbb/268c852/index.html
Comparing Changes: 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
v4.0.0-alpha.2
Documentation v4.0.0-alpha.2: https://raw.githack.com/jaywcjlove/tsbb/fbc5cd0/index.html
Comparing Changes: 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
v4.0.0-alpha.1
Documentation v4.0.0-alpha.1: https://raw.githack.com/jaywcjlove/tsbb/5aaeff8/index.html
Comparing Changes: 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
v4.0.0-alpha.0
Documentation v4.0.0-alpha.0: https://raw.githack.com/jaywcjlove/tsbb/81e570f/index.html
Comparing Changes: 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": { ... }
}
}
v4.0.0
Documentation v4.0.0: https://raw.githack.com/jaywcjlove/tsbb/9963c7e/index.html
Comparing Changes: v4.0.0-alpha.3...v4.0.0
Migrate from tsbb 3.x to 4.x: #439
npm i [email protected]
Updates in version v4
- Updated typescript v5 dependency
- Updated jest v29 dependency
- Refactored feature package management
- Refactored create-tsbb based on package internal examples generation
- 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": { ... }
}
}
v3.7.9
Documentation v3.7.9: https://raw.githack.com/jaywcjlove/tsbb/3526d27/index.html
Comparing Changes: 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
v3.7.8
Documentation v3.7.8: https://raw.githack.com/jaywcjlove/tsbb/2d78305/index.html
Comparing Changes: 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
v3.7.7
Documentation v3.7.7: https://raw.githack.com/jaywcjlove/tsbb/42ced9c/index.html
Comparing Changes: 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