{"id":21648018,"url":"https://github.com/atom-community/babel-preset-atomic","last_synced_at":"2025-07-19T02:34:16.212Z","repository":{"id":37046369,"uuid":"280122447","full_name":"atom-community/babel-preset-atomic","owner":"atom-community","description":"babel configuration used in atom-ide-community","archived":false,"fork":false,"pushed_at":"2025-07-12T13:55:14.000Z","size":520,"stargazers_count":0,"open_issues_count":11,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T15:35:35.521Z","etag":null,"topics":["babel","babel-preset","zero-configuration"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/babel-preset-atomic","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atom-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-16T10:17:39.000Z","updated_at":"2022-06-30T08:07:48.000Z","dependencies_parsed_at":"2023-10-12T05:30:38.746Z","dependency_job_id":"9044281e-2ef9-416e-aa77-4f099c2e45e7","html_url":"https://github.com/atom-community/babel-preset-atomic","commit_stats":{"total_commits":198,"total_committers":5,"mean_commits":39.6,"dds":0.4040404040404041,"last_synced_commit":"5380c91ca5bbabcdc5e0ffbf9415afb76747fbd8"},"previous_names":["atom-ide-community/babel"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/atom-community/babel-preset-atomic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atom-community%2Fbabel-preset-atomic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atom-community%2Fbabel-preset-atomic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atom-community%2Fbabel-preset-atomic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atom-community%2Fbabel-preset-atomic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atom-community","download_url":"https://codeload.github.com/atom-community/babel-preset-atomic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atom-community%2Fbabel-preset-atomic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265877079,"owners_count":23842956,"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","babel-preset","zero-configuration"],"created_at":"2024-11-25T06:52:56.145Z","updated_at":"2025-07-19T02:34:16.187Z","avatar_url":"https://github.com/atom-community.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-preset-atomic\n\nThis includes the babel configuration used for JavaScript packages in atom-ide-community.\n\n## Installation\n\n```\nnpm install --save-dev babel-preset-atomic\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e This package also needs `@babel/core` and/or `@babel/cli`. \u003c/summary\u003e\n\nIf using `npm`, the bundled babel is hoisted automatically.\n\nIf using `pnpm`, either add the following to your `.npmrc` to hoist the prettier bundled with the config\n\n```\npublic-hoist-pattern[]=*\n```\n\nOr install these yourself in your `devDependencies`.\n\n```\npnpm install -save-dev \"@babel/core\"\npnpm install -save-dev \"@babel/cli\"\n```\n\n\u003c/details\u003e\n\n## Usage\n\nCreate a `babel.config.json` file at the root of the project with the following content:\n\n```json\n{\n  \"presets\": [\"babel-preset-atomic\"],\n  \"plugins\": [],\n  \"exclude\": \"node_modules/**\",\n  \"sourceMap\": \"inline\"\n}\n```\n\nUse `babel.config.js` if you need more control over the config.\n\n\u003cdetails\u003e\n\u003csummary\u003ebabel.config.js version\u003c/summary\u003e\n\n```js\nlet presets = [\"babel-preset-atomic\"]\n\nlet plugins = []\n\nmodule.exports = {\n  presets: presets,\n  plugins: plugins,\n  exclude: \"node_modules/**\",\n  sourceMap: \"inline\",\n}\n```\n\n\u003c/details\u003e\n\n## Options\n\n1. `keepModules`\n\nIf you want to keep the ES modules as they are (not transforming `import` to `require`), set `BABEL_KEEP_MODULES` environment variable to `true`. This is useful with bundlers which need you to keep ES6 modules intact. By default the ES6 modules are transformed to ES5 (the value is `false`)\n\n```\ncross-env BABEL_KEEP_MODULES=true\n```\n\nTo permanently set this option, you can add it to your babel config (which disables environment variable effectiveness):\n\n```js\n{\n  \"presets\": [\n    [\n      \"babel-preset-atomic\",\n      {\n        \"keepModules\": true,\n      },\n    ],\n  ]\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ebabel.config.js version\u003c/summary\u003e\n\n```js\nlet presets = [\n  [\n    \"babel-preset-atomic\",\n    {\n      keepModules: true,\n    },\n  ],\n]\n```\n\n\u003c/details\u003e\n\n2. `targets`\n\nTo change the target of `preset-env` plugin. By default this is configured for Electron 11.\n\n```json\n{\n  \"presets\": [\n    [\n      \"babel-preset-atomic\",\n      {\n        \"targets\": {\n          \"electron\": 9\n        }\n      }\n    ]\n  ]\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ebabel.config.js version\u003c/summary\u003e\n\n```js\nlet presets = [\n  [\n    \"babel-preset-atomic\",\n    {\n      targets: {\n        electron: 9,\n      },\n    },\n  ],\n]\n```\n\n\u003c/details\u003e\n\n3. `addModuleExports`:\n\nAllows to `require` a ES6 module that has exported a single thing as `default`, in a ES5 fashion without `require().default`. This is `true` by default for backward compatibility with Atom packages.\n\n```json\n{\n  \"presets\": [\n    [\n      \"babel-preset-atomic\",\n      {\n        \"addModuleExports\": false\n      }\n    ]\n  ]\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ebabel.config.js version\u003c/summary\u003e\n\n```js\nlet presets = [\n  [\n    \"babel-preset-atomic\",\n    {\n      addModuleExports: false,\n    },\n  ],\n]\n```\n\n\u003c/details\u003e\n\n4. `addModuleExportsDefaultProperty`:\n\n```json\n{\n  \"presets\": [\n    [\n      \"babel-preset-atomic\",\n      {\n        \"addModuleExports\": true,\n        \"addModuleExportsDefaultProperty\": true\n      }\n    ]\n  ]\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ebabel.config.js version\u003c/summary\u003e\n\n```js\nlet presets = [\n  [\n    \"babel-preset-atomic\",\n    {\n      addModuleExports: true,\n      addModuleExportsDefaultProperty: true,\n    },\n  ],\n]\n```\n\n\u003c/details\u003e\n\nAdds `default` property to `module.exports` so the ES6 module can be required in the ES6 fashion as well (by `require().default`). This is `false` by default.\n\n6. `react`\n\nEnable `\"@babel/preset-react\"`. `true` by default. You can also pass an object to provide more options for this plugin.\n\n7. `flow`\n\nEnable `\"@babel/preset-flow\"`. `true` by default. You can also pass an object to provide more options for this plugin.\n\n7. `typescript`\n\nEnable `\"@babel/preset-typescript\"`. `true` by default. You can also pass an object to provide more options for this plugin.\n\n9. `removeAllUseStrict`\n\nRemove all `'use strict'` from all files. Passed to [`babel-plugin-transform-not-strict`](https://github.com/atom-ide-community/babel-plugin-transform-not-strict#usage-remove-all). This is `false` by default.\n\n10. `notStrictDirectiveTriggers` and `notStrictCommentTriggers`\n\nThese specify `\"not strict\"` triggers. Passed to [`babel-plugin-transform-not-strict`](https://github.com/atom-ide-community/babel-plugin-transform-not-strict#usage-extra-directive-or-comment-triggers).\n\n## Behind the scenes\n\nIt includes the following presets:\n\n- `\"@babel/preset-env\"` (configured for `electron`)\n- `\"@babel/preset-react\"`\n- `\"@babel/preset-flow\"`\n- `\"@babel/preset-typescript\"`\n\nIt also includes all the proposal plugins such as:\n\n- `\"@babel/plugin-proposal-optional-chaining\"`\n- `\"@babel/plugin-proposal-nullish-coalescing-operator\"`\n- `\"@babel/plugin-proposal-export-default-from\"`\n- `\"@babel/plugin-proposal-export-namespace-from\"`\n- ...\n\nIt includes the plugins for compile time code generation:\n\n- `\"babel-plugin-codegen\"`\n- `\"babel-plugin-preval\"`\n\nIt has the preset that automatically adds default export for older Node versions (so no `require().default` is needed).\n\n- `\"babel-plugin-add-module-exports\"`\n\nIt has the plugin for removing `'use strict'`:\n\n- `\"babel-plugin-transform-not-strict\"`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatom-community%2Fbabel-preset-atomic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatom-community%2Fbabel-preset-atomic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatom-community%2Fbabel-preset-atomic/lists"}