generator-atom-package

A Yeoman generator to build and develop Atom packages

Atom Packages Generator

This Yeoman generator is used to build and develop Atom packages.

Every part of the generated package is functional. You will just have to adapt it to your needs.

You can choose to either develop your package in CoffeeScript or JavaScript. The same features are supported for the both languages.

  1. Install the generator: npm install -g generator-atom-package
  2. Create the package: yo atom-package
  1. Link your package to use it in Atom: grunt link
  2. Lint your files (on the fly): grunt watch
  3. Code! You can use Ctrl-Alt-Cmd-L from the editor to reload the UI

Notes:

  • The steps 1 and 2 can be grouped in one command: grunt dev. This is generally the first command you type when you start working on the package.
  • You can unlink the package with: grunt unlink, it will make it disappear from Atom after the next UI reload.
  • You can run your tests via APM with: grunt test.
  • The default task (grunt) will lint your files and run the tests (only once).

Below is the default configuration:

     _-----_
    |       |
    |--(o)--|   .--------------------------.
   `---------´  |    Welcome to Yeoman,    |
    ( _´U`_ )   |   ladies and gentlemen!  |
    /___A___\   '__________________________'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

So I heard you want to create an Atom package?
[?] What is the name of your package: Atom Package
[?] Give a short description of your package: Add awesome stuff to Atom
[?] What is the version of your package: 0.0.0
[?] Do you want to use CoffeeScript? Yes
[?] Will you host your package on a git repository? Yes
[?] Will you host your package on GitHub? Yes
[?] Give me the last part of the project URL: username/repository
[?] Which license do you want to use? MIT

Scaffolds out a complete Atom package:

.
├── .editorconfig
├── .git
├── .gitignore
├── Gruntfile.coffee
├── README.md
├── bundle
│   └── yeoman.png
├── grammars
│   └── yeoman.cson
├── keymaps
│   └── main.cson
├── lib
│   └── atom-package-generator.coffee
├── menus
│   ├── app.cson
│   └── context.cson
├── node_modules
├── package.json
├── snippets
│   └── main.cson
├── spec
│   └── atom-package-generator-spec.coffee
└── stylesheets
    └── main.less
  • 0.0.6

    • Fix GitHub URL repos
  • 0.0.5

    • Add the snippets template
    • Add the context menu template
    • Add the gitignore template
    • Add a bundle directory to store local resources
    • Add the grammar template
  • 0.0.4

    • Add keymaps template
    • Add application menu template
    • grunt test now launch the tests through APM
    • Can now link and unlink the package through Grunt
  • 0.0.3

    • Add JSHint/CoffeeLint
    • Add LESS lint
    • Add Jasmine
    • Add a watcher to reload the file linting on the fly
    • Initialize a git repository
    • Handle GitHub repository
  • 0.0.2

    • Entry point changed to ./libs/app-name.(js|coffee)
    • CoffeeScript template file is compiled on the fly
  • 0.0.1

    • Simple working generator
    • Support of JavaScript/CoffeeScript

MIT © Aymeric Beaumet