{"id":18547599,"url":"https://github.com/kensho-technologies/babel-preset","last_synced_at":"2025-04-09T20:31:16.151Z","repository":{"id":46059612,"uuid":"76303085","full_name":"kensho-technologies/babel-preset","owner":"kensho-technologies","description":"Babel preset to transpile ES2020, TS(X), and language proposals","archived":false,"fork":false,"pushed_at":"2024-07-03T21:31:44.000Z","size":3897,"stargazers_count":3,"open_issues_count":5,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-06T10:44:40.709Z","etag":null,"topics":["babel","emotion","jsx","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kensho-technologies.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-12T23:02:15.000Z","updated_at":"2025-03-28T15:48:46.000Z","dependencies_parsed_at":"2023-11-19T20:29:10.360Z","dependency_job_id":"e39abda2-2327-40b5-9734-604fc13d38de","html_url":"https://github.com/kensho-technologies/babel-preset","commit_stats":{"total_commits":321,"total_committers":6,"mean_commits":53.5,"dds":0.09345794392523366,"last_synced_commit":"0bbf70ca416960ee2199088d86c0940b0b4c69f9"},"previous_names":["kensho-technologies/babel-preset-kensho"],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kensho-technologies%2Fbabel-preset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kensho-technologies%2Fbabel-preset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kensho-technologies%2Fbabel-preset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kensho-technologies%2Fbabel-preset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kensho-technologies","download_url":"https://codeload.github.com/kensho-technologies/babel-preset/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248107298,"owners_count":21048896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","emotion","jsx","typescript"],"created_at":"2024-11-06T20:30:06.043Z","updated_at":"2025-04-09T20:31:15.693Z","avatar_url":"https://github.com/kensho-technologies.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-preset\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/kensho-technologies/babel-preset/ci.yml?branch=main)](https://github.com/kensho-technologies/babel-preset/actions)\n[![npm](https://img.shields.io/npm/v/@kensho-technologies/babel-preset.svg)](https://npm.im/@kensho-technologies/babel-preset)\n\nThis [Babel 7 preset](http://babeljs.io/docs/plugins/#presets) transpiles ES2020, JSX, and selected language proposals. It also includes optimizations for specific contexts.\n\n## Install\n\n```sh\n$ npm install -D @kensho-technologies/babel-preset\n```\n\n## Usage\n\nYou can set up Babel transpilation in [several ways](http://babeljs.io/docs/setup). Choose a method, and configure Babel to include the preset, e.g. in a `babel.config.json`:\n\n```json\n{\n  \"presets\": [\"@kensho-technologies/babel-preset\"]\n}\n```\n\n## Options\n\nThe preset can be configured using several options. Note that some options' defaults depend on the [Babel environment](https://babeljs.io/docs/en/options#envname), which may be one of the following:\n\n| Environment   | Purpose                                                              |\n| ------------- | -------------------------------------------------------------------- |\n| `development` | Transpiling an app for development.                                  |\n| `production`  | Transpiling an app for production.                                   |\n| `test`        | Transpiling an app or library to run in the current version of Node. |\n| `cjs`         | Transpiling a library for distribution as CJS.                       |\n| `esm`         | Transpiling a library for distribution as ESM.                       |\n\nThe present extends [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env), and forwards all additional options to that preset.\n\n### `emotion`\n\n`false` | [`options`](https://emotion.sh/docs/@emotion/babel-preset-css-prop#options)\u003cbr /\u003e\nDefault: `false`\n\nWhether to enable support for CSS-in-JS via [Emotion](https://emotion.sh). If an `options` object is passed, it is forwarded to the [Emotion plugin](https://emotion.sh/docs/@emotion/babel-plugin). This option requires an additional dependency on [`@emotion/react`](https://npm.im/@emotion/react).\n\n### `modules`\n\n`false` | `'commonjs'`\u003cbr /\u003e\nDefault: `'commonjs'` in `test` and `cjs` envs, `false` otherwise\n\nWhether to compile ESM imports/exports to another module format.\n\n```js\n// false:\nimport foo from './foo'\n\n// 'commonjs' (roughly):\nconst foo = require('./foo')\n```\n\n### `react`\n\n`false` | [`options`](https://babeljs.io/docs/en/babel-preset-react#options)\u003cbr /\u003e\nDefault: `{}`\n\nWhether to transpile JSX expressions. If an `options` object is passed, it is forwarded to the [React preset](https://babeljs.io/docs/en/babel-preset-react).\n\n### `reactRefresh`\n\n`false` | `options`\u003cbr /\u003e\nDefault: `{}` in `development` env if `react` is enabled\n\nWhether to transform React function components for fast refresh. If an `options` object is passed, it is forwarded to the [React Refresh plugin](https://github.com/facebook/react/tree/3c1efa0d771d3dfb2666b7f4a4392cc851146d44/packages/react-refresh). The list of available options is not currently documented.\n\nThis option should only ever be enabled in development. It also requires [bundler integration](https://github.com/pmmmwh/react-refresh-webpack-plugin) because the output code references global variables containing the Refresh runtime. If this integration cannot be added to a project's development environment, this option should be disabled.\n\n### `runtime`\n\n`true` | `false`\u003cbr /\u003e\nDefault: `true`\n\nWhether to enable the [Babel runtime transform](https://babeljs.io/docs/en/next/babel-plugin-transform-runtime). This is encouraged to reduce bundle size, but requires adding `@babel/runtime` as a dependency.\n\n### `targets`\n\nSee [`@babel/preset-env` options documentation](http://babeljs.io/docs/en/babel-preset-env#targets).\u003cbr /\u003e\nDefault: current node version in `test` environment, inferred from browserslist config otherwise\n\nThe transpilation targets to pass to `@babel/preset-env`.\n\n### `typescript`\n\n`false` | [`options`](https://babeljs.io/docs/en/babel-preset-typescript#options)\u003cbr /\u003e\nDefault: `{}`\n\nWhether to enable TypeScript support. If an `options` object is passed, it's passed to the TypeScript preset.\n\n## License\n\nLicensed under the Apache 2.0 License. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\nCopyright 2020-present Kensho Technologies, LLC. The present date is determined by the timestamp of the most recent commit in the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkensho-technologies%2Fbabel-preset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkensho-technologies%2Fbabel-preset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkensho-technologies%2Fbabel-preset/lists"}