{"id":15698318,"url":"https://github.com/clayrisser/babel-plugin-gjs","last_synced_at":"2025-08-01T18:04:06.568Z","repository":{"id":116526207,"uuid":"203441136","full_name":"clayrisser/babel-plugin-gjs","owner":"clayrisser","description":"babel plugin for gjs","archived":false,"fork":false,"pushed_at":"2023-07-11T06:16:46.000Z","size":1160,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-20T17:05:04.702Z","etag":null,"topics":["babel","cgjs","gjs","node","plugin"],"latest_commit_sha":null,"homepage":"https://codejam.ninja","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/clayrisser.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2019-08-20T19:27:16.000Z","updated_at":"2023-07-11T06:16:51.000Z","dependencies_parsed_at":"2023-07-25T14:31:05.927Z","dependency_job_id":null,"html_url":"https://github.com/clayrisser/babel-plugin-gjs","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"8f2ed7fa115efb6d3170a057132c5b87ccb52d7f"},"previous_names":["codejamninja/babel-plugin-gjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/clayrisser/babel-plugin-gjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fbabel-plugin-gjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fbabel-plugin-gjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fbabel-plugin-gjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fbabel-plugin-gjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clayrisser","download_url":"https://codeload.github.com/clayrisser/babel-plugin-gjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fbabel-plugin-gjs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268272403,"owners_count":24223784,"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-08-01T02:00:08.611Z","response_time":67,"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":["babel","cgjs","gjs","node","plugin"],"created_at":"2024-10-03T19:25:37.265Z","updated_at":"2025-08-01T18:04:06.472Z","avatar_url":"https://github.com/clayrisser.png","language":"JavaScript","funding_links":["https://liberapay.com/codejamninja/donate"],"categories":[],"sub_categories":[],"readme":"# babel-plugin-gjs\n\n[![GitHub stars](https://img.shields.io/github/stars/codejamninja/babel-plugin-gjs.svg?style=social\u0026label=Stars)](https://github.com/codejamninja/babel-plugin-gjs)\n\n\u003e babel plugin for gjs\n\nFor best results, run transpiled code with [CGJS](https://github.com/cgjs/cgjs)\n\nPlease ★ this repo if you found it useful ★ ★ ★\n\n## Features\n\n#### Wraps classes with `GObject.registerClass`\n\n##### Before\n\n```js\nclass MyWindow extends Gtk.Window {\n  constructor() {\n    super({ title: 'Hello World' });\n    this.button = new Gtk.Button({ label: 'Click here' });\n    this.button.connect('clicked', this.handleClicked);\n    this.add(this.button);\n  }\n\n  handleClicked() {\n    console.log('Button clicked');\n  }\n}\n```\n\n##### After\n\n```js\nconst GObject = imports.gi.GObject;\n\nconst MyWindow = GObject.registerClass(\n  class MyWindow extends Gtk.Window {\n    _init() {\n      super._init({ title: 'Hello World' });\n      this.button = new Gtk.Button({ label: 'Click here' });\n      this.button.connect('clicked', this.handleClicked);\n      this.add(this.button);\n    }\n\n    handleClicked() {\n      console.log('Button clicked');\n    }\n  }\n);\n```\n\n## Installation\n\n```sh\nnpm install --save-dev babel-plugin-gjs\n```\n\n_.babelrc_\n\n```json\n{\n  \"presets\": [\n    [\n      \"@babel/preset-env\",\n      {\n        \"targets\": {\n          \"node\": \"4\"\n        }\n      }\n    ]\n  ],\n  \"plugins\": [\"gjs\"]\n}\n```\n\n## Dependencies\n\n- [CGJS](https://github.com/cgjs/cgjs)\n- [GJS](https://wiki.gnome.org/Projects/Gjs)\n- [NodeJS](https://nodejs.org)\n\n## Usage\n\n```sh\nbabel src -d lib\ncgjs lib\n```\n\n## Support\n\nSubmit an [issue](https://github.com/codejamninja/babel-plugin-gjs/issues/new)\n\n## Screenshots\n\n[Contribute](https://github.com/codejamninja/babel-plugin-gjs/blob/master/CONTRIBUTING.md) a screenshot\n\n## Contributing\n\nReview the [guidelines for contributing](https://github.com/codejamninja/babel-plugin-gjs/blob/master/CONTRIBUTING.md)\n\n## License\n\n[MIT License](https://github.com/codejamninja/babel-plugin-gjs/blob/master/LICENSE)\n\n[Jam Risser](https://codejam.ninja) © 2018\n\n## Changelog\n\nReview the [changelog](https://github.com/codejamninja/babel-plugin-gjs/blob/master/CHANGELOG.md)\n\n## Credits\n\n- [Jam Risser](https://codejam.ninja) - Author\n\n## Support on Liberapay\n\nA ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.\n\n[Add some fuel](https://liberapay.com/codejamninja/donate) if you'd like to keep me going!\n\n[![Liberapay receiving](https://img.shields.io/liberapay/receives/codejamninja.svg?style=flat-square)](https://liberapay.com/codejamninja/donate)\n[![Liberapay patrons](https://img.shields.io/liberapay/patrons/codejamninja.svg?style=flat-square)](https://liberapay.com/codejamninja/donate)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayrisser%2Fbabel-plugin-gjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclayrisser%2Fbabel-plugin-gjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayrisser%2Fbabel-plugin-gjs/lists"}