Skip to content

Releases: jaywcjlove/tsbb

v4.0.0-alpha.2

28 Mar 15:27
Compare
Choose a tag to compare

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 tsbb@4.0.0

v4.0.0-alpha.1

28 Mar 15:04
Compare
Choose a tag to compare

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 tsbb@4.0.0

v4.0.0-alpha.0

28 Mar 09:53
Compare
Choose a tag to compare

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 tsbb@4.0.0
- 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

28 Mar 16:17
Compare
Choose a tag to compare

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 tsbb@4.0.0

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": { ... }
  } 
}

v3.7.9

05 Dec 14:31
Compare
Choose a tag to compare

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

npm i tsbb@3.7.9

v3.7.8

22 Oct 05:56
Compare
Choose a tag to compare

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

npm i tsbb@3.7.8

v3.7.7

23 Aug 03:41
Compare
Choose a tag to compare

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

npm i tsbb@3.7.7

v3.7.6

24 Jun 16:25
Compare
Choose a tag to compare

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

npm i tsbb@3.7.6

v3.7.5

20 May 06:49
Compare
Choose a tag to compare

Documentation v3.7.5: https://raw.githack.com/jaywcjlove/tsbb/c201887/index.html
Comparing Changes: v3.7.4...v3.7.5

npm i tsbb@3.7.5

v3.7.4

20 May 06:23
Compare
Choose a tag to compare

Documentation v3.7.4: https://raw.githack.com/jaywcjlove/tsbb/4eac18f/index.html
Comparing Changes: v3.7.3...v3.7.4

npm i tsbb@3.7.4