{"id":15637056,"url":"https://github.com/littledivy/deno_swc","last_synced_at":"2025-04-13T15:35:34.511Z","repository":{"id":36978046,"uuid":"280628097","full_name":"littledivy/deno_swc","owner":"littledivy","description":" The SWC compiler for Deno. ","archived":false,"fork":false,"pushed_at":"2023-04-19T13:55:12.000Z","size":27339,"stargazers_count":116,"open_issues_count":11,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T06:34:33.173Z","etag":null,"topics":["ast","bundler","deno","hacktoberfest","javascript","parser","rust","spack","swc","typescript"],"latest_commit_sha":null,"homepage":"","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/littledivy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-18T09:55:31.000Z","updated_at":"2025-03-11T16:02:00.000Z","dependencies_parsed_at":"2024-10-22T18:55:46.271Z","dependency_job_id":null,"html_url":"https://github.com/littledivy/deno_swc","commit_stats":{"total_commits":160,"total_committers":9,"mean_commits":17.77777777777778,"dds":"0.17500000000000004","last_synced_commit":"f86f9bf90ee9ca1baabee8a090a352e960656c14"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littledivy%2Fdeno_swc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littledivy%2Fdeno_swc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littledivy%2Fdeno_swc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littledivy%2Fdeno_swc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/littledivy","download_url":"https://codeload.github.com/littledivy/deno_swc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248737146,"owners_count":21153715,"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":["ast","bundler","deno","hacktoberfest","javascript","parser","rust","spack","swc","typescript"],"created_at":"2024-10-03T11:09:44.961Z","updated_at":"2025-04-13T15:35:34.489Z","avatar_url":"https://github.com/littledivy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/littledivy/deno_swc\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/littledivy/deno_swc/master/assets/deno_swc.png\" alt=\"deno_swc logo\" width=\"310\"\u003e\n  \u003c/a\u003e\n  \u003ch3 align=\"center\"\u003edeno_swc\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n    The SWC compiler for Deno.\n \u003c/p\u003e\n\u003c/p\u003e\n\n![ci](https://github.com/littledivy/deno_swc/workflows/ci/badge.svg)\n![](https://img.shields.io/github/v/release/littledivy/deno_swc?style=plastic)\n\n# Usage\n\n`parse()`\n\n```typescript\nimport { parse, print } from \"https://deno.land/x/swc@0.2.1/mod.ts\";\n\nconst code = `const x: string = \"Hello, Deno SWC!\"`;\n\nconst ast = parse(code, {\n  target: \"es2019\",\n  syntax: \"typescript\",\n  comments: false,\n});\n\n// {\n//   type: \"Module\",\n//   span: { start: 0, end: 36, ctxt: 0 },\n//   body: [\n//     {\n//       type: \"VariableDeclaration\",\n//       span: [Object],\n//       kind: \"const\",\n//       declare: false,\n//       declarations: [Array]\n//     }\n//   ],\n//   interpreter: null\n// }\n```\n\n`print()`\n\n```typescript\nconst { code } = print(ast, {\n  minify: true,\n  module: {\n    type: \"commonjs\",\n  },\n});\n\n// const x = \"Hello, Deno SWC!\"\n```\n\n...and `transform()`\n\n```typescript\nconst { code } = transform(\"const x: number = 2;\", {\n  jsc: {\n    target: \"es2016\",\n    parser: {\n      syntax: \"typescript\",\n    },\n  },\n});\n\n// const x = 2;\n```\n\n## Copyright\n\ndeno_swc is licensed under the MIT license. Please see the [LICENSE](LICENSE)\nfile.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittledivy%2Fdeno_swc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flittledivy%2Fdeno_swc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittledivy%2Fdeno_swc/lists"}