{"id":13526853,"url":"https://github.com/matthewmueller/joy","last_synced_at":"2025-05-16T10:07:49.501Z","repository":{"id":53149845,"uuid":"104183702","full_name":"matthewmueller/joy","owner":"matthewmueller","description":"A delightful Go to Javascript compiler (ON HOLD)","archived":false,"fork":false,"pushed_at":"2020-10-02T14:18:57.000Z","size":7180,"stargazers_count":1327,"open_issues_count":54,"forks_count":35,"subscribers_count":28,"default_branch":"master","last_synced_at":"2024-04-14T08:06:45.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mat.tm/joy","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matthewmueller.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":"2017-09-20T07:49:46.000Z","updated_at":"2024-04-03T10:42:07.000Z","dependencies_parsed_at":"2022-09-13T18:12:32.169Z","dependency_job_id":null,"html_url":"https://github.com/matthewmueller/joy","commit_stats":null,"previous_names":["matthewmueller/golly"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewmueller%2Fjoy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewmueller%2Fjoy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewmueller%2Fjoy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewmueller%2Fjoy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewmueller","download_url":"https://codeload.github.com/matthewmueller/joy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509476,"owners_count":22082891,"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-08-01T06:01:35.943Z","updated_at":"2025-05-16T10:07:44.491Z","avatar_url":"https://github.com/matthewmueller.png","language":"Go","readme":"![joy compiler](https://user-images.githubusercontent.com/170299/33872480-b10be348-df49-11e7-80b1-06736c8298ae.png)\n\n⚠️  Joy development is currently **on hold**. Recent Go -\u003e WASM developments look like a more promising path to Go being a great choice for frontend development. I'm thrilled to see development moving so quickly now and I think our efforts are better spent improving the Go to WASM compiler. As for Joy, there are quite a few interesting nuggets of code in here that I'd encourage you to dig up, polish and open source 😊\n\nThanks for your interest in this project!\n\n❤️ **Matt**\n\n---\n\nTranslate idiomatic Go into concise Javascript that works in every browser. Use Go's type system and world-class tooling to build large web applications with confidence.\n\nVisit [mat.tm/joy](https://mat.tm/joy) to learn more about Joy.\n\n---\n\n[Getting Started](#getting-started)\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026#183;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Examples](#examples)\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026#183;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Using the CLI](#using-the-cli)\n\n[Contributing](#contributing)\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026#183;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[FAQ](#faq)\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026#183;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[More Links](#more-links)\n\n[Joy API](https://godoc.org/github.com/matthewmueller/joy)\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026#183;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;*DOM API (coming soon!)*\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026#183;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;*Virtual DOM API (coming soon!)*\n\n---\n\n## Getting Started\n\n**1. Install Joy:**\n\n```sh\ncurl -sfL https://raw.githubusercontent.com/matthewmueller/joy/master/install.sh | sh\n```\n\n\u003e Note: you can also download from the [releases tab](https://github.com/matthewmueller/joy/releases).\n\n**2. Create a `main.go` file with the following code:**\n\n```go\npackage main\n\nfunc main() {\n  println(\"hi world!\")\n}\n```\n\n**3. Run the code in a real browser:**\n\n```sh\njoy run main.go\n```\n\n**4. See the compiled Javascript:**\n\n```sh\njoy main.go\n```\n\n## Examples\n\nVisit https://mat.tm/joy/#examples or peruse the [test suite](https://github.com/matthewmueller/joy/tree/master/testdata).\n\n## Using the CLI\n\n**Compile Go into Javascript:**\n\n```\njoy \u003cmain.go\u003e\n```\n\n**Compile and run the Go code in headless chrome:**\n\n```\njoy run \u003cmain.go\u003e\n```\n\n**Build a development version of the code:**\n\n```\njoy build --dev \u003cmain.go\u003e...\n```\n\n**Build a production version of the code (coming soon!):**\n\n```\njoy build \u003cmain.go\u003e...\n```\n\n**Start a development server with livereload:**\n\n```\njoy serve \u003cmain.go\u003e...\n```\n\n\u003e Run `joy help` for additional details.\n\n## Contributing\n\nSo happy to hear you're interested in contributing! Here's a quick rundown of how to get setup:\n\n**Setup**\n\n1. Make sure you have the Go environment setup on your computer. There are quite a few better resources online on how to do that\n\n2. `go get -u -v github.com/matthewmueller/joy/...` to install the compiler from source\n\n3. `go test -v` to run all the tests\n\n**Links and tips:**\n\n- https://astexplorer.net/: I've been using this to figure out how to build the JS tree\n- http://goast.yuroyoro.net/ : Simple Go AST viewer\n- https://github.com/estree/estree/blob/master/es5.md: Link to the ES3 AST format, this is implemented in [syntax.go](internal/jsast/syntax.go)\n- https://golang.org/ref/spec: You may need to refer to this to see what types are possible in Go's AST\n- To run all tests: `go test -v`\n- To run individual tests: `go test -v -run Test/08`\n- `pretty.Println(ast)` will pretty print the JS AST (requires [this package](https://github.com/kr/pretty))\n- `ast.Print(nil, node)` will pretty print the Go AST\n\nIf you have any further questions, [open an issue](github.com/matthewmueller/joy/issues) or reach out to me on [twitter](https://twitter.com/mattmueller).\n\n## FAQ\n\nVisit https://mat.tm/joy/#faq to view the FAQ.\n\n## More Links\n\n- Run `joy help` to see what else Joy can do for you\n- Visit mat.tm/joy to read more about Joy's origins\n- Chat with us in **#joy-compiler** on Slack at gophers.slack.com\n- Star github.com/matthewmueller/joy to follow the development\n- Follow twitter.com/mattmueller for project updates\n","funding_links":[],"categories":["Go","6. 其他"],"sub_categories":["6.5 Assembly"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewmueller%2Fjoy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewmueller%2Fjoy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewmueller%2Fjoy/lists"}