{"id":23263678,"url":"https://github.com/danielbayley/atom-modular-snippets","last_synced_at":"2025-08-20T19:31:11.724Z","repository":{"id":47528763,"uuid":"62347124","full_name":"danielbayley/atom-modular-snippets","owner":"danielbayley","description":":atom: A modular solution to snippets in @Atom.","archived":false,"fork":false,"pushed_at":"2018-09-07T17:30:25.000Z","size":16,"stargazers_count":9,"open_issues_count":6,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-30T16:57:07.452Z","etag":null,"topics":["apm","atom","coffeescript","config","editor","modular","package","snippets"],"latest_commit_sha":null,"homepage":"https://atom.io/packages/modular-snippets","language":"CoffeeScript","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/danielbayley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-30T22:54:15.000Z","updated_at":"2023-09-05T13:28:58.000Z","dependencies_parsed_at":"2022-07-21T02:48:48.211Z","dependency_job_id":null,"html_url":"https://github.com/danielbayley/atom-modular-snippets","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fatom-modular-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fatom-modular-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fatom-modular-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fatom-modular-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielbayley","download_url":"https://codeload.github.com/danielbayley/atom-modular-snippets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445926,"owners_count":18227066,"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":["apm","atom","coffeescript","config","editor","modular","package","snippets"],"created_at":"2024-12-19T14:19:45.103Z","updated_at":"2024-12-19T14:19:45.620Z","avatar_url":"https://github.com/danielbayley.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![badge][apm]][package]\n[![badge][chat]][#slack]\n\nModular Snippets\n================\nA modular solution to [snippets] in [Atom], including support for project-specific collections.\n\nAny valid snippets [_[CSON]_ or JSON] file inside [`ATOM_HOME`]`/snippets/**` will be loaded automatically, or reloaded if modified.\n\nThis package does not interfere with the existing `snippets.cson`, so you can slowly transition to this more modular approach.\n\nThe Atom `Snippets…` menu item will be overridden to open your snippets folder in a new window, along with the default `snippets.cson` if it still exists.\n\nThe Atom `Snippets…` menu item will be overridden to open your snippets folder in a new window, along with the default `snippets.cson` if it still exists.\n\nProject Snippets\n----------------\nSome snippets might only be relevant to a particular project, so it makes sense to store them with that project; these could then be committed to version control and shared between a team. These _local_ snippets are loaded from the first item found in the root of your project based on the following order:\n\n* `[.]snippets.cson`\n* `[.]snippets/**/*.cson`\n* `snippets: {object}` in `package.json`\n* `snippets: {object}` in your _[project-config]_\n\nAPI\n---\nThis package also provides a [service] to load any snippets `{object}`, file or folder…\n~~~ js\n// package.json\n\"consumedServices\": {\n  \"modular-snippets\": {\n    \"versions\": {\n      \"^1.0.0\": \"consume\"\n    }\n  }\n},\n~~~\n~~~ coffee\n# index.coffee\n{Disposable} = require 'atom'\n\nsnippet = # {object}, file or folder.\n  '.source.coffee':\n    Snippet:\n      prefix: 'prefix'\n      body: 'snippet'\n\nconsumeSnippets: ({load}) -\u003e\n  load snippet\n  new Disposable -\u003e stopUsingService load\n~~~\nor using ES6 if you’re into that…\n~~~ js\n// index.js\n'use babel';\n\nimport { Disposable } from 'atom';\n\nlet snippet = { // object }, file or folder.\n  '.source.js': {\n    Snippet: {\n      prefix: 'prefix',\n      body: 'snippet'\n    }\n  }\n};\n\nfunction consumeSnippets({load} =\u003e {\n  load(snippet);\n  return new Disposable(() =\u003e stopUsingService(load));\n}\n~~~\n\nInstall\n-------\n`apm install modular-snippets` or search “snippets” under packages within Atom.\n\nLicense\n-------\n[MIT] © [Daniel Bayley]\n\nThanks to [@thibmaek] for the base repository.\n\n[MIT]:              LICENSE.md\n[Daniel Bayley]:    https://github.com/danielbayley\n[atom]:             https://atom.io\n[apm]:              https://img.shields.io/apm/v/modular-snippets.svg?style=flat-square\n[package]:          https://atom.io/packages/modular-snippets\n[chat]:             https://img.shields.io/badge/chat-atom.io%20slack-ff69b4.svg?style=flat-square\n[#slack]:           https://atom-slack.herokuapp.com\n\n[snippets]:         http://flight-manual.atom.io/using-atom/sections/snippets\n[CSON]:             https://github.com/bevry/cson#what-is-cson\n[`ATOM_HOME`]:      http://flight-manual.atom.io/using-atom/sections/basic-customization/#custom-home-location-with-an-environment-variable\n[service]:          http://flight-manual.atom.io/behind-atom/sections/interacting-with-other-packages-via-services\n[sync-settings]:    https://atom.io/packages/sync-settings\n[project-config]:   https://github.com/danielbrodin/atom-project-manager/#local-settings-file\n[gist]:             https://github.com/gist\n[@thibmaek]:        https://atom.io/users/thibmaek\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielbayley%2Fatom-modular-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielbayley%2Fatom-modular-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielbayley%2Fatom-modular-snippets/lists"}