{"id":13515556,"url":"https://github.com/tunnckoCore/esmc","last_synced_at":"2025-03-31T04:37:12.711Z","repository":{"id":32808214,"uuid":"143226393","full_name":"tunnckoCore/esmc","owner":"tunnckoCore","description":":fire: Modern JavaScript, today. :sparkles: Blazingly fast zero-config compiler/language/runtime built on @rollup, @babel + ton of optimizations, and @eslint + @prettier, with support for @flowtype and TypeScript.","archived":false,"fork":false,"pushed_at":"2022-12-03T00:25:58.000Z","size":340,"stargazers_count":4,"open_issues_count":18,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T01:08:50.251Z","etag":null,"topics":["babel","cli","compiler","es2018","eslint","esm","esmodules","esnext","flowtype","javascipt","language","unicorns","zero-config"],"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/tunnckoCore.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":null,"security":null,"support":null}},"created_at":"2018-08-02T01:31:15.000Z","updated_at":"2024-03-09T19:22:04.000Z","dependencies_parsed_at":"2023-01-14T22:30:54.520Z","dependency_job_id":null,"html_url":"https://github.com/tunnckoCore/esmc","commit_stats":null,"previous_names":["olstenlarck/esmc"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunnckoCore%2Fesmc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunnckoCore%2Fesmc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunnckoCore%2Fesmc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tunnckoCore%2Fesmc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tunnckoCore","download_url":"https://codeload.github.com/tunnckoCore/esmc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246418693,"owners_count":20773935,"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","cli","compiler","es2018","eslint","esm","esmodules","esnext","flowtype","javascipt","language","unicorns","zero-config"],"created_at":"2024-08-01T05:01:12.840Z","updated_at":"2025-03-31T04:37:10.717Z","avatar_url":"https://github.com/tunnckoCore.png","language":"JavaScript","readme":"# esmc [![npm version][npmv-img]][npmv-url] [![github release][ghrelease-img]][ghrelease-url] [![License][license-img]][license-url]\n\n\u003e :fire: Modern JavaScript, today. :sparkles: Blazingly fast zero-config compiler, built on [**@Babel**](https://github.com/babel/babel) and [**@ESLint**](https://github.com/eslint/eslint) (and [**@FlowType**](https://flow.org)).\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/olstenlarck/esmc\"\u003e\n    \u003cimg src=\"./logo.jpg\", width=\"35%\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n\u003cdiv id=\"thetop\"\u003e\u003c/div\u003e\n\n[![Code style][codestyle-img]][codestyle-url]\n[![CircleCI linux build][linuxbuild-img]][linuxbuild-url]\n[![CodeCov coverage status][codecoverage-img]][codecoverage-url]\n[![DavidDM dependency status][dependencies-img]][dependencies-url]\n[![Renovate App Status][renovateapp-img]][renovateapp-url]\n[![Make A Pull Request][prs-welcome-img]][prs-welcome-url]\n[![Semantically Released][new-release-img]][new-release-url]\n\nIf you have any _how-to_ kind of questions, please read the [Contributing Guide](./CONTRIBUTING.md) and [Code of Conduct](./CODE_OF_CONDUCT.md) documents.  \nFor bugs reports and feature requests, [please create an issue][open-issue-url] or ping [@tunnckoCore](https://twitter.com/tunnckoCore) at Twitter.\n\n[![Conventional Commits][ccommits-img]][ccommits-url]\n[![Become a Patron][patreon-img]][patreon-url]\n[![Share Love Tweet][shareb]][shareu]\n[![NPM Downloads Weekly][downloads-weekly-img]][npmv-url]\n[![NPM Downloads Monthly][downloads-monthly-img]][npmv-url]\n[![NPM Downloads Total][downloads-total-img]][npmv-url]\n\nProject is [semantically](https://semver.org) \u0026 automatically released on [CircleCI][codecoverage-url] with [new-release][] and its [New Release](https://github.com/apps/new-release) GitHub App.\n\n## Table of Contents\n- [Install](#install)\n- [Usage](#usage)\n- [Notes](#notes)\n- [See Also](#see-also)\n- [Contributing](#contributing)\n- [Contributors](#contributors)\n- [Users](#users)\n- [License](#license)\n\n## Install\nThis project requires [**Node.js**](https://nodejs.org) **^8.9.0 || ^10.6.0**. Install it using [**yarn**](https://yarnpkg.com) or [**npm**](https://npmjs.com).  \n_We highly recommend to use Yarn when you think to contribute to this project._\n\n```bash\n$ yarn add esmc\n\n# or globally\n$ yarn global add esmc\n```\n\n## Usage\n\u003c!--  --\u003e\n\n1. Put your files in `src/`\n2. Run it easily with `esmc`\n3. Done.\n\nBasically it creates:\n\n- `dist/nodejs` folder for Node.js 8.9 \n  + or any passed version to `ESMC_NODE_VERSION` environment variable\n  + pass `dist/nodejs/index.js` to your `pkg.module` field, if you are not using `--no-esm` flag\n- `dist/browsers` folder for `\u003e= 1%, not dead, not IE \u003c= 11, last 1 Opera versions` browsers\n  + or anything passed to `ESMC_BROWSERSLIST` environment variable\n  + pass `dist/browsers/index.js` to your favorite bundler\n- `dist/nodejs/__index.js` using [esm][], so you can just use it in CJS\n  + pass it to your `pkg.main` field if you are not using `--no-esm` flag,\n  + otherwise just pass `dist/nodejs/index.js` there\n- generates `.js.flow` files _only_ on `dist/nodejs` folder, if `--flow` is passed\n\n## Notes\n\nBy default does not compiles to CommonJS. That's intentional, because bundlers handles ES Modules great. If you want pure CommonJS pass `--no-esm` flag.\n\n- It's mostly instantaneous, because it compiles only files that are changed\n- Babel config is basically externalized as [babel-preset-esmc][]\n  + pass `--no-build` to disable Babel transpilation\n  + note that you cannot use `--no-build` and `--no-esm` together\n- Linting is done, based on [eslint-config-esmc][]\n- If you love static typing, just pass `--flow` flag and it will run type checking before any compilation phase\n  + **note** that you may want to further configure [.flowconfig](https://flow.org/en/docs/config/) file\n- All errors, of any phase, are styled similar to ESLint's `codeframe` reporter, so everything is just freaking awesome\n- It does not compiles common tests file patterns (if they are in your source directory)\n- To run your files using the same config, you can pass `esmc/register` as `--require` hook\n- You can use `esmc lint` to only lint your files, using ESLint\n- You can use `esmc build` to only compile your source files, using Babel\n- Use `--force` flag to start fresh (it deletes `dist` and cleans up the caches)\n\nTo try it out, clone the repo, `yarn install` and run `yarn cli` - this will\ncompile everything from `example-src/` folder as was described above. \n\n- Make some lint error and run it `yarn cli` \n- Make some type error there and run `yarn cli --flow`\n- Make some build error and run `yarn cli`\n\nYou will see that style of all errors are similar to ESLint's `codeframe` reporter. \n\n**[back to top](#thetop)**\n\n## See Also\nSome of these projects are used here or were inspiration for this one, others are just related. So, thanks for your existance!\n- [asia](https://www.npmjs.com/package/asia): Blazingly fast, magical and minimalist testing framework, for Today and Tomorrow | [homepage](https://github.com/olstenlarck/asia#readme \"Blazingly fast, magical and minimalist testing framework, for Today and Tomorrow\")\n- [babel-preset-esmc](https://www.npmjs.com/package/babel-preset-esmc): Sharebale and the default Babel preset for the `esmc` compiler | [homepage](https://github.com/olstenlarck/babel-preset-esmc \"Sharebale and the default Babel preset for the `esmc` compiler\")\n- [charlike](https://www.npmjs.com/package/charlike): Small, fast, simple and streaming project scaffolder for myself, but not… [more](https://github.com/tunnckoCore/charlike) | [homepage](https://github.com/tunnckoCore/charlike \"Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options\")\n- [eslint-config-esmc](https://www.npmjs.com/package/eslint-config-esmc): Shareable and the default config for the `esmc` compiler | [homepage](https://github.com/olstenlarck/eslint-config-esmc \"Shareable and the default config for the `esmc` compiler\")\n- [gitcommit](https://www.npmjs.com/package/gitcommit): Lightweight and joyful `git commit` replacement. Conventional Commits compliant. | [homepage](https://github.com/tunnckoCore/gitcommit \"Lightweight and joyful `git commit` replacement. Conventional Commits compliant.\")\n- [new-release](https://www.npmjs.com/package/new-release): A stable alternative to [semantic-release][]. Only handles NPM publishing and nothing… [more](https://github.com/tunnckoCore/new-release#readme) | [homepage](https://github.com/tunnckoCore/new-release#readme \"A stable alternative to [semantic-release][]. Only handles NPM publishing and nothing more. For creating GitHub releases use the Semantic Release GitHub App\")\n- [xaxa](https://www.npmjs.com/package/xaxa): Zero-config linting, powered by few amazing unicorns, AirBnB \u0026 Prettier. | [homepage](https://github.com/olstenlarck/xaxa \"Zero-config linting, powered by few amazing unicorns, AirBnB \u0026 Prettier.\")\n\n**[back to top](#thetop)**\n\n## Contributing\nPlease read the [Contributing Guide](./CONTRIBUTING.md) and [Code of Conduct](./CODE_OF_CONDUCT.md) documents for advices.  \nFor bugs reports and feature requests, [please create an issue][open-issue-url] or ping [@tunnckoCore](https://twitter.com/tunnckoCore) at Twitter.\n\n## Contributors\nThanks to the hard work of [these wonderful people](./CONTRIBUTORS.md) this project is alive and it also follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.  \n[Pull requests](https://github.com/tunnckoCore/contributing#opening-a-pull-request), stars and all kind of [contributions](https://opensource.guide/how-to-contribute/#what-it-means-to-contribute) are always welcome. :stars:\n\n## Users\nYou can see who uses `esmc` in the [USERS.md](./USERS.md) file. Please feel free adding this file if it not exists.  \nIf you or your organization are using this project, consider adding yourself to the list of users.  \n**Thank You!** :heart:\n\n## License\nCopyright (c) 2018-present, [Charlike Mike Reagent][author-link] `\u003colsten.larck@gmail.com\u003e`.  \nReleased under the [Apache-2.0 License][license-url].\n\n---\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.7.0, on August 07, 2018._\n\n\u003c!-- Heading badges --\u003e\n[npmv-url]: https://www.npmjs.com/package/esmc\n[npmv-img]: https://badgen.net/npm/v/esmc?icon=npm\n\n[ghrelease-url]: https://github.com/tunnckoCore/esmc/releases/latest\n[ghrelease-img]: https://badgen.net/github/release/tunnckoCore/esmc?icon=github\n\n[license-url]: https://github.com/tunnckoCore/esmc/blob/master/LICENSE\n[license-img]: https://badgen.net/npm/license/esmc\n\n\u003c!-- Front line badges --\u003e\n\n[codestyle-url]: https://github.com/tunnckoCore/eslint-config-esmc\n[codestyle-img]: https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb\n\n[linuxbuild-url]: https://circleci.com/gh/tunnckoCore/esmc/tree/master\n[linuxbuild-img]: https://badgen.net/circleci/github/tunnckoCore/esmc/master?label=build\u0026icon=circleci\n\n[codecoverage-url]: https://codecov.io/gh/tunnckoCore/esmc\n[codecoverage-img]: https://badgen.net/codecov/c/github/tunnckoCore/esmc?icon=codecov\n\n[dependencies-url]: https://david-dm.org/tunnckoCore/esmc\n[dependencies-img]: https://badgen.net/david/dep/tunnckoCore/esmc?label=deps\n\n[ccommits-url]: https://conventionalcommits.org/\n[ccommits-img]: https://badgen.net/badge/conventional%20commits/v1.0.0/dfb317\n\n[new-release-url]: https://github.com/standard-release\n[new-release-img]: https://badgen.net/badge/semantically/released/05c5ff\n\n[downloads-weekly-img]: https://badgen.net/npm/dw/esmc\n[downloads-monthly-img]: https://badgen.net/npm/dm/esmc\n[downloads-total-img]: https://badgen.net/npm/dt/esmc\n\n[renovateapp-url]: https://renovatebot.com\n[renovateapp-img]: https://badgen.net/badge/renovate/enabled/green\n\n[prs-welcome-img]: https://badgen.net/badge/PRs/welcome/green\n[prs-welcome-url]: http://makeapullrequest.com\n\n[paypal-donate-url]: https://paypal.me/tunnckoCore/10\n[paypal-donate-img]: https://badgen.net/badge/$/support/purple\n\n[patreon-url]: https://www.patreon.com/bePatron?u=5579781\n[patreon-img]: https://badgen.net/badge/become/a%20patron/F96854?icon=patreon\n\n[shareu]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/esmc\u0026via=tunnckoCore\n[shareb]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter\n[open-issue-url]: https://github.com/tunnckoCore/esmc/issues/new\n[author-link]: https://tunnckocore.com\n\n[babel-preset-esmc]: https://github.com/tunnckoCore/babel-preset-esmc\n[eslint-config-esmc]: https://github.com/tunnckoCore/eslint-config-esmc\n[esm]: https://github.com/standard-things/esm\n[new-release]: https://github.com/tunnckoCore/new-release\n[semantic-release]: https://github.com/semantic-release/semantic-release\n","funding_links":["https://paypal.me/tunnckoCore/10","https://www.patreon.com/bePatron?u=5579781"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FtunnckoCore%2Fesmc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FtunnckoCore%2Fesmc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FtunnckoCore%2Fesmc/lists"}