atom editor the editor that GitHub is building the text editor we've always wanted is at a very early state and has some great potential, luckily got an invite from to paw at and it and did a silly plugin for it as well which just plays around with some text converting colors to RGB:
Lately I wrote a Yeoman generator to create packages from atom editor. You can paw at the source of generator-atom and install it npm install generator-atom
[generator-atom]$ mkdir atom-plugin &&cd$_[generator-atom]$ yo atom
_-----_
| |
|--(o)--| .--------------------------.
`---------´ | Welcome to Yeoman, |
( _´U`_ ) | ladies and gentlemen! |
/___A___\ '__________________________' | ~ |
__'.___.'__
´ ` |° ´ Y `You're using the fantastic Atom generator.[?] What would like name your atom package? atom-plugin[?] Descirbe your package in one-line: My awesome atom package![?] What license would apply for this package? MIT[?] What's your github username? hemanth
[?] Are you using any grammars? yes
[?] Are you using keymaps? yes
[?] Are you adding menus? yes
[?] Are you writing any snippets? yes
[?] Are you doing some stylesheets? yes
create lib/atom-plugin.coffee
create grammars/grammar.cson
create keymaps/keymap.cson
create stylesheets/style.css
create menus/application-menu.cson
create menus/context-menu.cson
create snippets/language.cson
create spec/atom-plugin_test.coffee
create spec/fixtures/atom-plugin_fixture.coffee
create .jshintrc
create .gitignore
create .travis.yml
create README.md
create package.json
create index.coffee
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.
[generator-atom]$ tree
.
├── README.md
├── grammars
│ └── grammar.cson
├── index.coffee
├── keymaps
│ └── keymap.cson
├── lib
│ └── atom-plugin.coffee
├── menus
│ ├── application-menu.cson
│ └── context-menu.cson
├── package.json
├── snippets
│ └── language.cson
├── spec
│ ├── atom-plugin_test.coffee
│ └── fixtures
│ └── atom-plugin_fixture.coffee
└── stylesheets
└── style.css
8 directories, 12 files
You may not need all of the directories, indeed based on your need. Each of those file will have minimal boilerplate code that would help you get started.
The index.coffee includes the file in the lib dir and it looks like:
{"name":"atom-plugin","main":"./lib/atom-plugin","version":"0.0.0","description":"My awesome atom package!","license":"MIT","private":true,"repository":"https://github.com/hemanth/atom-plugin","engines":{"atom":">0.61.0"},"dependencies":{}}
If you notice the version is 0.0.0 and modifying the code as per the need, you could do a apm publish minor to publish the package, giving the fact that the repo is published in Github.
gif FTW?
Yeoman as always been at our service to make life easier, hope this generator helps you to create atom packages with ease!
Further, it would be useful if you could read creating atom package an official documentation and their API.