buildium

Build your current project, directly from Atom

idleberg

32,699

0

0.75.5

MIT

GitHub

This package consumes the following services:

buildium

Build your current project, directly from Atom

apm apm apm GitHub Actions David

This package is a fork of build, with a few key-differences:

Installation

apm

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

$ apm install buildium

Using Git

Change to your Atom packages directory:

Windows

# Powershell
$ cd $Env:USERPROFILE\.atom\packages
:: Command Prompt
$ cd %USERPROFILE%\.atom\packages

Linux & macOS

$ cd ~/.atom/packages/

Clone repository as buildium:

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

Inside the cloned directory, install dependencies using your preferred Node package manager:

$ yarn || npm install

Usage

Build Providers

This package provides services that ”build providers” can consume, it provides no functionality to build the code. In order to build, you will need to install additional packages. See the list of build providers for registered packages or search the packages website.

Build Files

If no provider suits your specific needs, you can create a build file in your project folder. A variety of file formats is supported, they need to match any of the following names:

Example

Let's take a look at a build file written in YAML

cmd: '<command to execute>'
name: '<name of target>'
args:
  - '<argument1>'
  - '<argument2>'
sh: true
cwd: '<current working directory for `cmd`>'
env:
  VARIABLE1: 'VALUE1'
  VARIABLE2: 'VALUE2'
errorMatch:
  - ^regexp1$
  - ^regexp2$
warningMatch:
  - ^regexp1$
  - ^regexp2$
keymap: '<keymap string>'
atomCommandName: 'namespace:command'
targets:
  extraTargetName:
    cmd: '<command to execute>'
    args:
    # (any previous options are viable here except `targets` itself)

Please refer to the original documentation for details on configuration options.

Replacements

The following parameters will be replaced in cmd, any entry in args, cwd and values of env. They should all be enclosed in curly brackets.

Placeholder Description
{FILE_ACTIVE} Full path to the active file, e.g. ~/github/atom-build/lib/build.js
{FILE_ACTIVE_PATH} Full path to the parent folder of the active file is, e.g. ~/github/atom-build/lib
{FILE_ACTIVE_NAME} Full name and extension of the active file, e.g. buildium.js
{FILE_ACTIVE_NAME_BASE} Base name of the active file, e.g. build
{FILE_ACTIVE_CURSOR_ROW} Line number of the last cursor sits in the active document
{FILE_ACTIVE_CURSOR_COLUMN} Column number of the last cursor sits in the active document
{PROJECT_PATH} Full path to project folder, e.g. ~/github/atom-build
{REPO_BRANCH_SHORT} Name of the active Git branch, e.g. main
{SELECTION} Selected text in the active document

Keybindings

The following keybindings are for Windows and Linux, Mac should use Cmd instead of Ctrl

Placeholder Description
Ctrl+Alt+B or F9 Builds your project
Ctrl+Alt+G or F4 Steps through build errors
Ctrl+Alt+H or Shift+F4 Steps to the first build error
Ctrl+Alt+V or F8 Toggles the build panel
Ctrl+Alt+T or F7 Show available build targets
Esc Terminates build and closes the build panel

License

This work is licensed under The MIT License