Comparing version 1.5.1 to 1.5.2
@@ -60,2 +60,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
preferBuiltins: false, | ||
extensions: ['.mjs', '.js', '.json', '.node', '.jsx'], | ||
}), | ||
@@ -70,3 +71,3 @@ commonjs({ | ||
return fs.existsSync(tsconfig) ? tsconfig : undefined; | ||
})(), typescript: resolveTypescript(), noEmitHelpers: false, importHelpers: false, module: "ES6", target: "ES5", sourceMap: options.sourcemap, declaration: !!typings }, (!!typings && { | ||
})(), typescript: resolveTypescript(), jsx: "react", noEmitHelpers: false, importHelpers: false, module: "ES6", target: "ES5", sourceMap: options.sourcemap, declaration: !!typings }, (!!typings && { | ||
declarationDir: path.dirname(path.resolve(cwd, typings)), | ||
@@ -73,0 +74,0 @@ }))), |
{ | ||
"name": "bunchee", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "zero config bundler for js/ts/jsx libraries", | ||
@@ -13,3 +13,3 @@ "bin": { | ||
"clean": "rm -rf ./dist", | ||
"prepublishOnly": "yarn clean && yarn build && chmod +x dist/cli.js", | ||
"prepublishOnly": "yarn clean && yarn build && chmod +x dist/cli.js && yarn test", | ||
"build:cli": "ts-node src/cli.ts src/cli.ts -f cjs -o dist/cli.js", | ||
@@ -16,0 +16,0 @@ "build:main": "ts-node src/cli.ts src/index.ts -f cjs", |
# bunchee | ||
> zero config bundler for JavaScript/TypeScript/JSX library | ||
![bunchee](https://user-images.githubusercontent.com/4800338/98430015-7ce64f00-20e5-11eb-8c64-41addfbd4ede.png) | ||
![bunchee](https://user-images.githubusercontent.com/4800338/98430015-7ce64f00-20e5-11eb-8c64-41addfbd4ede.png) | ||
<p align="left"> | ||
<a href="https://npm.im/bunchee"> | ||
<img src="https://badgen.net/npm/v/bunchee"> | ||
</a> | ||
<a href="https://github.com/huozhi/bunchee/actions?workflow=CI"> | ||
<img src="https://github.com/huozhi/bunchee/workflows/CI/badge.svg"> | ||
</a> | ||
</p> | ||
[![CI Status](https://github.com/huozhi/bunchee/workflows/CI/badge.svg)](https://github.com/huozhi/bunchee/actions?workflow=CI) | ||
Bunchee can help you to bundle your library into one file with zero configuration. It's built on top of rollup and babel. | ||
@@ -20,3 +27,17 @@ Let you focus on writing code and can generate multiple types of module (commonjs, esmodule) at the same time. | ||
## Usage | ||
### Basic | ||
Declare your main field and module field in package.json, then call bunchee cli in build scripts. If you're using typescript, types will be generated automatically based on your package.json field `typings` or `types`. | ||
```json | ||
{ | ||
"main": "dist/pkg.cjs.js", | ||
"module": "dist/pkg.esm.js", | ||
"scripts": { | ||
"build": "bunchee ./src/index.js" | ||
}, | ||
"types": "dist/types/index.d.ts" | ||
} | ||
``` | ||
### CLI | ||
@@ -42,19 +63,4 @@ | ||
### Use NPM Script | ||
#### Example Scripts | ||
Declare your main field and module field in package.json, then call bunchee cli in build scripts. If you're using typescript, types will be generated automatically based on your package.json field `typings` or `types`. | ||
```json | ||
{ | ||
"main": "dist/pkg.cjs.js", | ||
"module": "dist/pkg.esm.js", | ||
"scripts": { | ||
"build": "bunchee ./src/index.js" | ||
}, | ||
"types": "dist/index.d.ts" | ||
} | ||
``` | ||
### Use CLI | ||
```sh | ||
@@ -71,2 +77,2 @@ cd <project-root-dir> | ||
This plugin requires at least [TypeScript 3.7](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html). | ||
This library requires at least [TypeScript 3.7](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24516
340
76