diff --git a/README.md b/README.md index 317a89d..c75f11b 100644 --- a/README.md +++ b/README.md @@ -85,23 +85,23 @@ Then use `npm run` or `yarn` to invoke npm scripts as you normally would. `klap` uses sensible defaults for most part. However, as needed, use below properties in `package.json` to fine tune `klap`. You can also use `cli flags` to control config options for `klap`. -| option | cli flag(s) | description | default | -| ---------------- | ---------------------- | ---------------------------------------------- | ------------------------------------------------- | -| `source` | -s --source | source file to compile and bundle | `src/index.js` | -| `cjs` | -c --cjs | the output file for common js format | pkg.main | -| `esm` | -e --esm | the output file for esm format | pkg.module | -| `umd` | -u --umd | the output file for umd format | pkg.browser | -| `types` | -t --types | the output file for type definitions | pkg.types | -| `browserslist` | -b --browserslist | browserslist compatible compilation target | `>1% and supports es6-module and last 2 versions` | -| `klap.name` | -n --name | package name for `umd` bundles | sanitized `pkg.name` | -| `klap.port` | -p --port | port for development server | `1234` | -| `klap.example` | --example | location of index js/ts file for start command | `public/index.js` or `pkg.source` | -| `klap.fallback` | --fallback | location of index html file for start command | `public/index.html` | -| `klap.target` | --target | target for development server (`umd, es`) | `es` | -| `klap.sourcemap` | --no-sourcemap | sourcemaps for builds | `true` | -| `klap.minify` | --no-minify | minification for builds | `true` | -| `klap.runtime` | --runtime | the runtime for new JSX transform | `react` | -| `klap.globals` | | global names for umd bundles | `{}` | +| option | cli flag(s) | description | default | +| ---------------- | ---------------------- | ---------------------------------------------- | ------------------------------------------------------------- | +| `source` | -s --source | source file to compile and bundle | `src/index.js` | +| `cjs` | -c --cjs | the output file for common js format | pkg.main | +| `esm` | -e --esm | the output file for esm format | pkg.module | +| `umd` | -u --umd | the output file for umd format | pkg.browser | +| `types` | -t --types | the output file for type definitions | pkg.types | +| `browserslist` | -b --browserslist | browserslist compatible compilation target | `last 2 versions modern browsers if usage is greater than 1%` | +| `klap.name` | -n --name | package name for `umd` bundles | sanitized `pkg.name` | +| `klap.port` | -p --port | port for development server | `1234` | +| `klap.example` | --example | location of index js/ts file for start command | `public/index.js` or `pkg.source` | +| `klap.fallback` | --fallback | location of index html file for start command | `public/index.html` | +| `klap.target` | --target | target for development server (`umd, es`) | `es` | +| `klap.sourcemap` | --no-sourcemap | sourcemaps for builds | `true` | +| `klap.minify` | --no-minify | minification for builds | `true` | +| `klap.runtime` | --runtime | the runtime for new JSX transform | `react` | +| `klap.globals` | | global names for umd bundles | `{}` | ## :clinking_glasses: License diff --git a/src/options.js b/src/options.js index 5609df2..0dfcf22 100644 --- a/src/options.js +++ b/src/options.js @@ -5,7 +5,7 @@ const getOptions = (pkg, command) => { const { klap = {}, source = 'src/index.js', - browserslist = '>1% and supports es6-module and last 2 versions', + browserslist = 'last 2 Chrome versions or last 2 ChromeAndroid versions or last 2 Safari versions or last 2 iOS versions or last 2 Firefox versions or last 2 FirefoxAndroid versions or last 2 Edge versions or last 2 Opera versions or last 2 OperaMobile versions or last 2 Samsung versions and >1%', main, module, browser,