{"id":17027160,"url":"https://github.com/vslinko/es6-modules-commonjs","last_synced_at":"2026-05-05T06:31:48.106Z","repository":{"id":17386004,"uuid":"20158121","full_name":"vslinko/es6-modules-commonjs","owner":"vslinko","description":null,"archived":false,"fork":false,"pushed_at":"2014-05-25T23:12:10.000Z","size":140,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-27T23:36:16.732Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vslinko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-25T15:39:41.000Z","updated_at":"2016-11-27T10:22:52.000Z","dependencies_parsed_at":"2022-07-12T15:14:34.844Z","dependency_job_id":null,"html_url":"https://github.com/vslinko/es6-modules-commonjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vslinko%2Fes6-modules-commonjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vslinko%2Fes6-modules-commonjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vslinko%2Fes6-modules-commonjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vslinko%2Fes6-modules-commonjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vslinko","download_url":"https://codeload.github.com/vslinko/es6-modules-commonjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245009673,"owners_count":20546548,"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":[],"created_at":"2024-10-14T07:46:15.178Z","updated_at":"2026-05-05T06:31:43.080Z","avatar_url":"https://github.com/vslinko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# es6-modules-commonjs\n\nCompiles JavaScript written using ES6 modules to CommonJS syntax.\nFor example, this:\n\n```js\nmodule React from \"react\";\nimport {format} from \"util\";\nexport {React, format as fmt};\n```\n\ncompiles to this:\n\n```js\nvar React = require(\"react\");\nvar format = require(\"util\")[\"format\"];\nmodule.exports[\"React\"] = React, module.exports[\"fmt\"] = format;\n```\n\nFor more information about the proposed syntax, see the [wiki page on\nmodules](http://wiki.ecmascript.org/doku.php?id=harmony:modules).\n\n## Install\n\n```\n$ npm install es6-modules-commonjs\n```\n\n## Usage\n\n```js\n$ node\n\u003e var compile = require('es6-modules-commonjs').compile;\n```\n\nWithout arguments:\n\n```js\n\u003e compile('module util from \"util\";');\n'var util = require(\"util\");'\n```\n\n## Browserify\n\nBrowserify support is built in.\n\n```\n$ npm install es6-modules-commonjs  # install local dependency\n$ browserify -t es6-modules-commonjs $file\n```\n\n### Setup\n\nFirst, install the development dependencies:\n\n```\n$ npm install\n```\n\nThen, try running the tests:\n\n```\n$ npm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvslinko%2Fes6-modules-commonjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvslinko%2Fes6-modules-commonjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvslinko%2Fes6-modules-commonjs/lists"}