{"id":16847575,"url":"https://github.com/fabiosantoscode/ecmacomp","last_synced_at":"2025-07-25T02:37:35.192Z","repository":{"id":146300695,"uuid":"162157510","full_name":"fabiosantoscode/ecmacomp","owner":"fabiosantoscode","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-06T22:45:08.000Z","size":354,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T07:17:25.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabiosantoscode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-12-17T16:13:09.000Z","updated_at":"2019-03-06T22:45:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"bceff729-30c5-4040-ae9d-1317bc8c1b64","html_url":"https://github.com/fabiosantoscode/ecmacomp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fabiosantoscode/ecmacomp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fecmacomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fecmacomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fecmacomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fecmacomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiosantoscode","download_url":"https://codeload.github.com/fabiosantoscode/ecmacomp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fecmacomp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266944987,"owners_count":24010490,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-13T13:08:24.719Z","updated_at":"2025-07-25T02:37:35.165Z","avatar_url":"https://github.com/fabiosantoscode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ecmacomp [![Build Status](https://travis-ci.org/fabiosantoscode/ecmacomp.svg?branch=master)](https://travis-ci.org/fabiosantoscode/ecmacomp)\n\nCompile javascript modules, optimize them with prepack and terser if `NODE_ENV` is `production`, and do more optimisations from this project. Reduce your code in production today!\n\nFurther optimizations are coming up:\n\n - Caching React elements in variables and modifying them before passing them to React.createElement\n - Turning fs.readFileSync and other sync APIs into their Promise counterparts, and turning every function above the call into an async function\n - Removing react completely using rawact\n - Reducing GC allocations\n - Caching some function results\n - ...And other amazing optimizations\n\n## Usage (CLI)\n\nYou can disable rollup or prepack (to disable terser, use the `NODE_ENV` environment variable `NODE_ENV=production ecmacomp ...`)\n```bash\n$ ecmacomp input.js [--norollup] [--noprepack] [--public dir] [--output file]\n```\n\n## Usage (JS API)\n\n```javascript\nconst code = await require('ecmacomp')({ filename: 'input.js' })\nconst code2 = await require('ecmacomp')('function code() {}')\n```\n\n## Hacking `ecmacomp`\n\nTo hack on ecmacomp, clone this repository (`git clone https://github.com/fabiosantoscode/ecmacomp`), `cd` to it, run `npm i`, write a test in the appropriate place, respect the lint (`npm run lint`) and start hacking :)\n\nThis CLI command reveals the bytecode for a piece of javascript:\n\n```bash\n$ ecmacomp --parse input.js\n```\n\nYou can use this bytecode as reference because it's the bytecode used in all the optimisations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiosantoscode%2Fecmacomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiosantoscode%2Fecmacomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiosantoscode%2Fecmacomp/lists"}