Skip to content

TheraPackages/thera-left-bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto-run package

When Atom finishes loading, it will dispatch. Build Status

Settings

  • commands (default: [])
  • devCommands (default: [])

Gyazo

API

This package provides a service that you can use in other Atom packages.

Then, in your package's main module, call methods on the service:

module.exports =
  config:
    autoRun:
      type: 'boolean'
      default: false
      description: 'Requirement: auto-run package'

  activate: ->
    @subscriptions = new CompositeDisposable
    @subscriptions.add atom.commands.add 'atom-workspace',
      'my-package:start': => @start()

  activateConfig: ->
    pack = atom.packages.getActivePackage('auto-run')
    return unless pack

    autoRun = pack.mainModule.provideAutoRun()
    autoRun.registerCommand(
      keyPath: 'my-package.autoRun'
      command: 'my-package:start'
    )

package.json

{
  "name": "my-package",
  "activationCommands": {
    "atom-workspace": ["my-package:start"]
  }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published