expose-commands

Exposes package commands to the Developer Tools console

idleberg

39

1

0.4.0

MIT

GitHub

expose-commands

Exposes package commands to the Developer Tools console

apm apm apm CircleCI David

Let's get this straight from the beginning: chances are that you don't need this package. It's aimed at the top 1% of the weirdest Atom users out there or, more likely, Atom developers. As the tagline suggests, it lets you run package commands to the built-in development console – who even does that? Nobody!

Installation

Install expose-commands from Atom's Package Manager or the command-line equivalent:

$ apm install expose-commands

GitHub

Change to your Atom packages directory:

# Windows
$ cd %USERPROFILE%\.atom\packages

# Linux & macOS
$ cd ~/.atom/packages/

Clone the repository as expose-commands:

$ git clone https://github.com/idleberg/atom-expose-commands expose-commands

Usage

Package commands are exposed to the console on activation. There are a few things to keep in mind before you can run these:

  1. Commands are provided as packageName.commandName and always camel cased
  2. Commands are prefixed with $
  3. Commands are asynchronous

Examples:

// welcome:show
await $welcome.show();

// set-syntax:CoffeeScript
await $setSyntax.coffeeScript();

// set-syntax:SCSS
await $setSyntax.scss();

// NSIS:show-version
await $nsis.showVersion();

⚠️ At this point only commands with alphanumeric characters and dashes are supported

License

This work licensed under The MIT License