{"id":13833788,"url":"https://github.com/metal/atom-metal-snippets","last_synced_at":"2025-07-10T01:32:46.387Z","repository":{"id":78489001,"uuid":"62748328","full_name":"metal/atom-metal-snippets","owner":"metal","description":" :atom: :metal: Atom package for metal.js snippets","archived":false,"fork":false,"pushed_at":"2018-08-20T07:37:21.000Z","size":15,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-04T13:01:21.934Z","etag":null,"topics":["atom-editor","atom-package","metal","snippets"],"latest_commit_sha":null,"homepage":"https://atom.io/packages/atom-metal-snippets","language":null,"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/metal.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":"2016-07-06T19:35:46.000Z","updated_at":"2018-08-20T07:37:23.000Z","dependencies_parsed_at":"2023-03-02T11:15:41.823Z","dependency_job_id":null,"html_url":"https://github.com/metal/atom-metal-snippets","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal%2Fatom-metal-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal%2Fatom-metal-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal%2Fatom-metal-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metal%2Fatom-metal-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metal","download_url":"https://codeload.github.com/metal/atom-metal-snippets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225610498,"owners_count":17496287,"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":["atom-editor","atom-package","metal","snippets"],"created_at":"2024-08-04T13:00:26.436Z","updated_at":"2024-11-20T18:31:09.237Z","avatar_url":"https://github.com/metal.png","language":null,"funding_links":[],"categories":["Tools"],"sub_categories":["Marble Components"],"readme":"# Atom Metal.js Snippets\n[![apm](https://img.shields.io/apm/v/atom-metal-snippets.svg?style=flat-square)](https://atom.io/packages/atom-metal-snippets)\n[![apm](https://img.shields.io/apm/dm/atom-metal-snippets.svg?style=flat-square)](https://atom.io/packages/atom-metal-snippets)\n\nAn [Atom](https://atom.io/) snippet library for [Metal.js](https://github.com/metal/metal), and [metal-css-transitions](https://github.com/metal/metal-css-transitions). This library uses ES6 syntax.\n\nInstall via `apm install atom-metal-snippets`\n\n## Includes\n\nImports\n---\n\n#### [ict]\n```js\nimport Transition from 'metal-css-transitions';\n```\n\n#### [ijsx]\n```js\nimport Component from 'metal-jsx';\n```\n\n#### [imr]\n```js\nimport ${1} from 'metal-redux';\n```\n\n#### [isoy]\n```js\nimport Component from 'metal-soy';\n```\n\nSoy\n---\n\n#### [soy]\n```js\nimport Component, {Config} from 'metal-soy';\n\nimport templates from './${1:MyComponent}.soy';\n\nclass ${1:MyComponent} extends Component {\n\t${2:}\n}\n\n${1:MyComponent}.STATE = {\n};\n\nSoy.register(${1:MyComponent}, templates);\n\nexport default ${1:MyComponent};\n```\n\nJSX\n---\n\n#### [bind]\n```js\nthis.${1} = this.${1}.bind(this);\n```\n\n#### [jsx]\n```js\nimport Component, {Config} from 'metal-jsx';\n\nclass ${1:MyComponent} extends Component {\n\trender() {\n\t\treturn (\n\t\t\t${2:\u003cdiv\u003eMyComponent\u003c/div\u003e}\n\t\t);\n\t}\n}\n\n${1:MyComponent}.PROPS = {\n};\n\n${1:MyComponent}.STATE = {\n};\n\nexport default ${1:MyComponent};\n```\n\n#### [trans]\n```js\n\u003cTransition name=\"$1\"\u003e\n\t\t${2}\n\u003c/Transition\u003e\n```\n\nLife Cycles\n---\n\n#### [att]\n```js\nattached() {\n\t${1}\n}\n```\n\n#### [cre]\n```js\ncreated() {\n\t${1}\n}\n```\n\n#### [det]\n```js\ndetached() {\n\t${1}\n}\n```\n\n#### [dis]\n```js\ndisposed() {\n\t${1}\n}\n```\n\n#### [ren]\n```js\nrender() {\n\treturn (\n\t\t${2}\n\t);\n}\n```\n\n#### [rend]\n```js\nrendered() {\n\t${1}\n}\n```\n\n#### [shup]\n```js\nshouldUpdate(newState, newProps) {\n\t${1}\n}\n```\n\n#### [sync]\n```js\nsync$1(newVal, prevVal) {\n\t${2}\n}\n```\n\nState Management\n---\n\n#### [sst]\n```js\nthis.setState({$1});\n```\n\n#### [PRO]\n```js\n${1}.PROPS = {\n\t${2}\n};\n```\n\n#### [STA]\n```js\n${1}.STATE = {\n\t${2}\n};\n```\n\nTypes\n---\n\n#### [conan]\n```js\nConfig.any()\n```\n\n#### [conarr]\n```js\nConfig.array()\n```\n\n#### [conarro]\n```js\nConfig.arrayOf(${1})\n```\n\n#### [conboo]\n```js\nConfig.bool()\n```\n\n#### [confun]\n```js\nConfig.func()\n```\n\n#### [conino]\n```js\nConfig.instanceOf(${1})\n```\n\n#### [connum]\n```js\nConfig.number()\n```\n\n#### [conob]\n```js\nConfig.object()\n```\n\n#### [conobo]\n```js\nConfig.objectOf(${1})\n```\n\n#### [conoot]\n```js\nConfig.oneOfType(\n\t[\n\t\t${1},\n\t]\n)\n```\n\n#### [consha]\n```js\nConfig.shapeOf(\n\t{\n\t\t${1}\n\t}\n)\n```\n\n#### [constr]\n```js\nConfig.string()\n```\n\n#### [conval]\n```js\nConfig.value(${1})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetal%2Fatom-metal-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetal%2Fatom-metal-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetal%2Fatom-metal-snippets/lists"}