Git Product home page Git Product logo

atom-build's Introduction

Atom Build package

Release notes

Plugin installs Package version

Travis.ci Shield AppVeyor Shield

Gitter chat Slack Badge

Automatically build your project inside your new favorite editor, Atom.

  • Cmd Alt B / Ctrl Alt B / F9 builds your project.
  • Cmd Alt G / Ctrl Alt G / F4 cycles through causes of build error. See Error Matching.
  • Cmd Alt G / Ctrl Alt H / Shift F4 goes to the first build error. See Error Matching.
  • Cmd Alt V / Ctrl Alt V / F8 Toggles the build panel.
  • Cmd Alt T / Ctrl Alt T / F7 Displays the available build targets.
  • Esc terminates build / closes the build window.

Builds your project - configure it your way

work work

Automatically extract targets - here with build-make.

targets

Match errors and go directly to offending code - with Atom Linter.

error matching

(You can also use keyboard shortcuts to go to errors if you don't like Atom Linter, or want to keep package dependencies to a minimum).

Quick start

Install the build package using apm (apm can be installed using the install shell commands tool in Atom)(Linux/Mac):

$ apm install build

Create a file called .atom-build.yml (note the inital dot):

cmd: echo Hello world

Save it, and press Cmd Alt B (OS X) / Ctrl Alt B (Linux/Windows) and you should see the output of echo Hello world, which should be Hello world if all is correct.

Build providers

Instead of specifying commands manually, you can use a build provider. They often include functionality such as parsing targets (for instance all tasks from gulpfile.js or Makefile).

Full list of build providers

Specify a custom build command

If no build provider is enough to suit your needs, you can configure the custom build command extensively.

Supported formats and the name of the configuration file is

  • JSON: .atom-build.json
  • CSON: .atom-build.cson
  • YAML: .atom-build.yaml or .atom-build.yml
  • JS: .atom-build.js

Pick your favorite format, save that file in your project root, and specify exactly how your project is built (example in yml)

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)

Note that if sh is false cmd must only be the executable - no arguments here. If the executable is not in your path, either fully qualify it or specify the path in you environment (e.g. by setting the PATH var appropriately on UNIX-like systems).

If sh is true, it will use a shell (e.g. /bin/sh -c) on unix/linux, and command (cmd /S /C) on windows.

Programmatic Build commands (Javascript)

Using a JavaScript (JS) file gives you the additional benefit of being able to specify preBuild and postBuild and being able to run arbitrary match functions instead of regex-matching. The javascript function needs to return an array of matches. The fields of the matches must be the same as those that the regex can set.

Keep in mind that the JavaScript file must export the configuration

module.exports = {
  cmd: "myCommand",
  preBuild: function () {
    console.log('This is run **before** the build command');
  },
  postBuild: function () {
    console.log('This is run **after** the build command');
  },
  functionMatch: function (terminal_output) {
    // this is the array of matches that we create
    var matches = [];
    terminal_output.split(/\n/).forEach(function (line, line_number, terminal_output) {
      // all lines starting with a slash
      if line[0] == '/' {
        this.push({
          file: 'x.txt',
          line: line_number.toString(),
          message: line
        });
      }
    }.bind(matches));
    return matches;
  }
};

A major advantage of the functionMatch method is that you can keep state while parsing the output. For example, if you have a Makefile output like this:

make[1]: Entering directory 'foo'
make[2]: Entering directory 'foo/src'
testmake.c: In function 'main':
testmake.c:3:5: error: unknown type name 'error'

then you can't use a regex to match the filename, because the regex doesn't have the information about the directory changes. The following functionMatch can handle this case. Explanations are in the comments:

module.exports = {
  cmd: 'make',
  name: 'Makefile',
  sh: true,
  functionMatch: function (output) {
    const enterDir = /^make\[\d+\]: Entering directory '([^']+)'$/;
    const error = /^([^:]+):(\d+):(\d+): error: (.+)$/;
    // this is the list of error matches that atom-build will process
    const array = [];
    // stores the current directory
    var dir = null;
    // iterate over the output by lines
    output.split(/\r?\n/).forEach(line => {
      // update the current directory on lines with `Entering directory`
      const dir_match = enterDir.exec(line);
      if (dir_match) {
        dir = dir_match[1];
      } else {
        // process possible error messages
        const error_match = error.exec(line);
        if (error_match) {
          // map the regex match to the error object that atom-build expects
          array.push({
            file: dir ? dir + '/' + error_match[1] : error_match[1],
            line: error_match[2],
            col: error_match[3],
            message: error_match[4]
          });
        }
      }
    });
    return array;
  }
};

Another feature of functionMatch is that you can attach informational messages to the error messages:

pic of traces and custom error types

You can add these additional messages by setting the trace field of the error object. It needs to be an array of objects with the same fields as the error. Instead of adding squiggly lines at the location given by the file, line and col fields, a link is added to the popup message, so you can conveniently jump to the location given in the trace.

One more feature provided by functionMatch is the ability to use HTML in the message text by setting html_message instead of message. If both html_message and message are set, the latter takes priority.

Configuration options

Option Required Description
cmd [required] The executable command
name [optional] The name of the target. Viewed in the targets list (toggled by build:select-active-target).
args [optional] An array of arguments for the command
sh [optional] If true, the combined command and arguments will be passed to /bin/sh. Default true.
cwd [optional] The working directory for the command. E.g. what . resolves to.
env [optional] An object of environment variables and their values to set
errorMatch [optional] A (list of) regular expressions to match output to a file, row and col. See Error matching for details.
warningMatch [optional] Like errorMatch, but is reported as just a warning
functionMatch [optional] A (list of) javascript functions that return a list of match objects
keymap [optional] A keymap string as defined by Atom. Pressing this key combination will trigger the target. Examples: ctrl-alt-k or cmd-U.
killSignals [optional] An array of signals. The signals will be sent, one after each time Escape is pressed until the process has been terminated. The default value is SIGINT -> SIGTERM -> SIGKILL. The only signal which is guaranteed to terminate the process is SIGKILL so it is recommended to include that in the list.
atomCommandName [optional] Command name to register which should be on the form of namespace:command. Read more about Atom CommandRegistry. The command will be available in the command palette and can be trigger from there. If this is returned by a build provider, the command can programatically be triggered by dispatching.
targets [optional] Additional targets which can be used to build variations of your project.
preBuild [optional] JS only. A function which will be called before executing cmd. No arguments. this will be the build configuration.
postBuild [optional] JS only. A function which will be called after executing cmd. It will be passed 3 arguments: bool buildOutcome indicating outcome of the running cmd, string stdout containing the contents of stdout, and string stderr containing the contents of stderr. this will be the build configuration.

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 {}

  • {FILE_ACTIVE} - Full path to the currently active file in Atom. E.g. /home/noseglid/github/atom-build/lib/build.js
  • {FILE_ACTIVE_PATH} - Full path to the folder where the currently active file is. E.g. /home/noseglid/github/atom-build/lib
  • {FILE_ACTIVE_NAME} - Full name and extension of active file. E.g., build.js
  • {FILE_ACTIVE_NAME_BASE} - Name of active file WITHOUT extension. E.g., build
  • {FILE_ACTIVE_CURSOR_ROW} - Line number where the last inserted cursor sits. E.g, 21
  • {FILE_ACTIVE_CURSOR_COLUMN} - Column number where the last inserted cursor sits. E.g, 42
  • {PROJECT_PATH} - Full path to the root of the project. This is normally the path Atom has as root. E.g /home/noseglid/github/atom-build
  • {REPO_BRANCH_SHORT} - Short name of the current active branch (if project is backed by git). E.g master or v0.9.1
  • {SELECTION} - Selected text.

Creating a build provider

Creating a build provider require very little code in the easiest case, and can be as complicated as necessary to achieve the correct functionality. Read more about building your own provider in the create provider documentation.

Error matching

Error matching lets you specify a single regular expression or a list of regular expressions, which capture the output of your build command and open the correct file, row and column of the error. For instance:

../foo/bar/a.c:4:26: error: expected ';' after expression
  printf("hello world\n")
                         ^
                         ;
1 error generated.

Would be matched with the regular expression: (?<file>[\\/0-9a-zA-Z\\._]+):(?<line>\\d+):(?<col>\\d+):\\s+(?<message>.+). After the build has failed, pressing Cmd Alt G (OS X) or Ctrl Alt G (Linux/Windows) (or F4 on either platform), a.c would be opened and the cursor would be placed at row 4, column 26.

Note the syntax for match groups. This is from the XRegExp package and has the syntax for named groups: (?<name> RE ) where name would be the name of the group matched by the regular expression RE.

The following named groups can be matched from the output:

  • file - [required] the file to open. May be relative cwd or absolute. (?<file> RE).
  • line - [optional] the line the error starts on. (?<line> RE).
  • col - [optional] the column the error starts on. (?<col> RE).
  • line_end - [optional] the line the error ends on. (?<line_end> RE).
  • col_end - [optional] the column the error ends on. (?<col_end> RE).
  • message - [optional] Catch the humanized error message. (?<message> RE).

The file should be relative the cwd specified. If no cwd has been specified, then the file should be relative the project root (e.g. the top most directory shown in the Atom Editor).

If your build outputs multiple errors, all will be matched. Press Cmd Alt G (OS X) or Ctrl Alt G (Linux/Windows) to cycle through the errors (in the order they appear, first on stderr then on stdout), or you can use the Atom Linter integration discussed in the next section.

Often, the first error is the most interesting since other errors tend to be secondary faults caused by that first one. To jump to the first error you can use Cmd Alt H (OS X) or Shift F4 (Linux/Windows) at any point to go to the first error.

Error matching and Atom Linter

Install Atom Linter and all your matched errors will listed in a neat panel.

Linter integration

Analytics

The atom-build package uses google analytics to keep track of which features are in use and at what frequency. This gives the maintainers a sense of what parts of the package is most important and what parts can be removed.

The data is fully anonymous and can not be tracked back to you in any way. This is what is collected

  • Version of package used.
  • Build triggered, succeeded or failed.
  • Which build tool was used.
  • Visibility of UI components.

If you really do not want to share this information, you can opt out by disabling the metrics package. This will disable all analytics collection, including the one from atom-build.

atom-build's People

Contributors

5n8ke avatar abtmr avatar braver avatar bwinton avatar c-bouthoorn avatar colin-kiegel avatar dmytrokyrychuk avatar doudou avatar dreamair avatar forivall avatar formigarafa avatar gawdl3y avatar gpit2286 avatar ingramz avatar ivankravets avatar jhasse avatar johnogle222 avatar keplersj avatar mackieloeffel avatar noseglid avatar nsf avatar oli-obk avatar rahlzel avatar siilwyn avatar sryze avatar tasnad avatar tcyrus avatar xpol avatar yufanyufan avatar zzzgit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-build's Issues

Add support for compiling nim scripts

It would be neat to have built-in support for compiling nim scripts. The configuration would be:

{
"cmd": "nim",
"args": [ "compile", "{FILE_ACTIVE}" ],
"sh": false,
"cwd": "{FILE_ACTIVE_PATH}"
}

It would probably be easy to add support for a few other popular languages, such as go or rust (I don't mention C or C++ because atom-build already has makefile support).

Option to disable build panel

I have a build task that is finished really fast and runs on every save.
The only problem is that every time when i save the build panel pops up for a few seconds and blocks the view of the code.

Maybe the best way to implement this would be that the build panel only opens when there is a error.

Keep one instance of CMD | Run start up commands [Enhancement]

Had an idea to speed up my build time.

Everytime I build, I run vcvarsall to access the Visual Studio's compiler, that takes a couple seconds and I'd like to shave that off.

To do that I suggest (if it hasn't already been done). To keep one instance of the cmd, or whatever shell you run, and have startup commands for when atom starts up, so everytime I build I don't have to call vcvarsall.

I'm not sure where I would do this in the code in build or the code at all, if I knew how to do so I would pull and make a merge request, but maybe I can learn.

0.22.0 update broke my editor

Error: The ::beforeRemove hook has been replaced by ::detached. See https://github.com/atom/space-pen#attacheddetached-hooks for details.
  at ReleaseNotesStatusBar.View (c:\Users\MyName\.atom\packages\build\node_modules\space-pen\lib\space-pen.js:150:15)
  at new ReleaseNotesStatusBar (c:\Users\MyName\AppData\Local\atom\app-0.165.0\resources\app\node_modules\release-notes\lib\release-notes-status-bar.js:14:58)
  at createStatusEntry (c:\Users\MyName\AppData\Local\atom\app-0.165.0\resources\app\node_modules\release-notes\lib\main.js:63:18)
  at c:\Users\MyName\AppData\Local\atom\app-0.165.0\resources\app\node_modules\release-notes\lib\main.js:70:22
  at Emitter.module.exports.Emitter.emit (c:\Users\MyName\AppData\Local\atom\app-0.165.0\resources\app\node_modules\event-kit\lib\emitter.js:82:11)
  at PackageManager.module.exports.PackageManager.activate (c:\Users\MyName\AppData\Local\atom\app-0.165.0\resources\app\src\package-manager.js:382:27)
  at Atom.module.exports.Atom.startEditorWindow (c:\Users\MyName\AppData\Local\atom\app-0.165.0\resources\app\src\atom.js:605:21)
  at Object.<anonymous> (c:\Users\MyName\AppData\Local\atom\app-0.165.0\resources\app\src\window-bootstrap.js:12:8)
  at Object.<anonymous> (c:\Users\MyName\AppData\Local\atom\app-0.165.0\resources\app\src\window-bootstrap.js:23:4)
  at Module._compile (module.js:468:26)
  at Object.Module._extensions..js (module.js:486:10)
  at Module.load (c:\Users\MyName\AppData\Local\atom\app-0.165.0\resources\app\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
  at Function.Module._load (module.js:318:12)
  at Module.require (module.js:373:17)
  at require (module.js:392:17)
  at window.onload (file:///C:/Users/MyName/AppData/Local/atom/app-0.165.0/resources/app/static/index.js:59:25)

Uncaught TypeError: Arguments to path.resolve must be strings

[Enter steps to reproduce below:]

  1. Open a new file (cmd-n on os-x)
  2. Make some alterations, do not save file.
  3. Execute build

Atom Version: 0.165.0
System: Mac OS X 10.10.1
Thrown From: build package, v0.21.0

Stack Trace

Uncaught TypeError: Arguments to path.resolve must be strings

At path.js:327

TypeError: Arguments to path.resolve must be strings
  at Object.exports.resolve (path.js:327:15)
  at Object.realpathSync (fs.js:1237:18)
  at Object.fs.realpathSync (/Applications/Atom.app/Contents/Resources/atom/common/lib/asar.js:198:27)
  at Object.module.exports.replace (/Users/noseglid/devel/atom-build/lib/build.js:131:27)
  at /Users/noseglid/devel/atom-build/lib/build.js:164:24
  at Function._.each._.forEach (/Users/noseglid/devel/atom-build/node_modules/underscore/underscore.js:108:9)
  at Object.module.exports.startNewBuild (/Users/noseglid/devel/atom-build/lib/build.js:163:7)
  at /Users/noseglid/devel/atom-build/lib/build.js:219:14
  at saveAndContinue (/Users/noseglid/devel/atom-build/lib/build.js:229:7)
  at Object.module.exports.doSaveConfirm (/Users/noseglid/devel/atom-build/lib/build.js:233:14)
  at Object.module.exports.build (/Users/noseglid/devel/atom-build/lib/build.js:215:10)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:167:20)

Commands

     -0:00.0 build:trigger (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "seti-ui",
      "seti-syntax"
    ],
    "disabledPackages": [
      "tabs",
      "tree-view",
      "symbols-view"
    ]
  },
  "build": {
    "monocleHeight": 0.5,
    "saveOnBuild": true
  }
}

Installed Packages

# User
atom-ctags, v2.5.5
autocomplete-plus, v1.1.0
blackspace, v1.0.0
build, v0.21.0
highlight-selected, v0.7.0
language-actionscript, v0.1.0
linter, v0.9.0
linter-jscs, v1.4.9
linter-jshint, v0.1.0
minimap, v3.4.9
minimap-git-diff, v3.0.11
minimap-highlight-selected, v3.0.0
seti-syntax, v0.2.1
seti-ui, v0.5.1
sublime-tabs, v0.4.8
travis-ci-status, v0.11.1
whitespace, v0.27.0

# Dev
bracket-matcher, v0.30.0
build, v0.21.0

/cc @atom/core

Build does not work on paths using symbolic links

Simple test scenario:

/tmp$ mkdir test
/tmp$ ln -s test test_link
/tmp$ cd test
/tmp/test$ cat > .atom-build.json
{
  "cmd": "cat",
  "args": [ "{FILE_ACTIVE}" ],
  "sh": false
}
/tmp/test$ cat > whatever.abc
Hello World!
/tmp/test$

When atom is started from /tmp/test, and I try to build whatever.abc using "Ctrl+Alt+b" everything works as expected. However if atom is started from /tmp/test_link it doesn't do anything. In other words:

This works:

/tmp/test$ atom

This doesn't:

/tmp/test_link$ atom

My use case involves many shared files between projects which is done using symbolic links. Having a copy of everything for each project is something I'd like to avoid...

Keyboard shortcut for closing build pane?

Assuming that the build went well, one doesn't usually want the build pane to remain there. But there is no option right now to close it with a keyboard shortcut; one must find and click the X. Any chance of a keyboard shortcut for closing the build pane?

Atom.Object.defineProperty.get is deprecated in build.js:39

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/usr/share/atom/resources/app/src/atom.js:55:11)
Object.activate (/mnt/devel/devel/atom-build/lib/build.js:39:9)
Package.activateNow (/usr/share/atom/resources/app/src/package.js:227:27)
<unknown> (/usr/share/atom/resources/app/src/package.js:213:28)
Package.measure (/usr/share/atom/resources/app/src/package.js:159:15)
Package.activate (/usr/share/atom/resources/app/src/package.js:207:14)
PackageManager.activatePackage (/usr/share/atom/resources/app/src/package-manager.js:404:21)
PackageManager.activatePackages (/usr/share/atom/resources/app/src/package-manager.js:393:14)
PackageManager.activate (/usr/share/atom/resources/app/src/package-manager.js:379:19)
Atom.startEditorWindow (/usr/share/atom/resources/app/src/atom.js:601:21)
Object.<anonymous> (/usr/share/atom/resources/app/src/window-bootstrap.js:12:8)
Object.<anonymous> (/usr/share/atom/resources/app/src/window-bootstrap.js:23:4)
Module._compile (module.js:468:26)
Object..js (module.js:486:10)
Module.load (/usr/share/atom/resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
Function.Module._load (module.js:318:12)
Module.require (module.js:373:17)
require (module.js:392:17)
window.onload (file:///usr/share/atom/resources/app/static/index.js:59:25)

Doesn't seem to work on Windows

I'm trying to execute a custom build command. I keep getting a message that says unable to execute with sh. When I set sh to false, the message says unable to execute.

I tried relative paths and full paths to my executable. Nothing seems to work.

Uncaught TypeError: Cannot read property 'sh' of undefined

Basic build file:

{
"cmd": "echo",
"args": "{ACTIVE_FILE}"
}

Atom Version: 0.184.0
System: Microsoft Windows 8.1 Pro
Thrown From: build package, v0.24.0

Stack Trace

Uncaught TypeError: Cannot read property 'sh' of undefined

At C:\Users\richard.osterloh\.atom\packages\build\lib\build.js:245

TypeError: Cannot read property 'sh' of undefined
  at ChildProcess.<anonymous> (C:\Users\richard.osterloh\.atom\packages\build\lib\build.js:245:38)
  at ChildProcess.emit (events.js:116:17)
  at Process.ChildProcess._handle.onexit (child_process.js:1070:12)
  at child_process.js:1142:20
  at process._tickCallback (node.js:364:11)

Commands

     -7:52.7 build:trigger (atom-text-editor.editor)
     -7:36.9 window:run-package-specs (atom-text-editor.editor)
     -7:24.7 core:backspace (atom-text-editor.editor)
     -7:22.2 command-palette:toggle (atom-text-editor.editor)
  2x -7:20.1 core:move-down (atom-text-editor.editor.mini)
  2x -7:18.7 core:move-up (atom-text-editor.editor.mini)
     -7:18.0 core:confirm (atom-text-editor.editor.mini)
     -7:18.0 build:stop (atom-text-editor.editor)
     -0:35.0 core:delete (atom-text-editor.editor)
     -0:26.0 core:paste (atom-text-editor.editor)
     -0:22.6 core:save (atom-text-editor.editor)
     -0:19.5 build:trigger (atom-text-editor.editor)
     -0:11.7 command-palette:toggle (atom-text-editor.editor)
     -0:09.1 core:confirm (atom-text-editor.editor.mini)
     -0:09.1 build:stop (atom-text-editor.editor)
     -0:05.7 build:trigger (atom-text-editor.editor)

Config

{
  "core": {
    "disabledPackages": [
      "autocomplete-clang",
      "symbols-view"
    ]
  },
  "build": {}
}

Installed Packages

# User
angularjs, v0.1.0
atom-ctags, v2.6.0
autocomplete-paths, v1.0.2
autocomplete-plus, v2.4.0
autocomplete-plus-async, v0.22.0
autocomplete-snippets, v1.0.1
build, v0.24.0
color-picker, v1.4.4
jsdoc, v0.9.0
language-cmake, v0.1.1
language-docker, v1.1.2
linter, v0.12.0
linter-cpplint, v0.1.3
linter-javac, v0.1.3
linter-jshint, v0.1.0
linter-scss-lint, v0.0.14
minimap, v4.5.0
symbols-tree-view, v0.6.1
sync-settings, v0.2.1

# Dev
No dev packages

Crashes if package.json doesn't have `engines`

The package.json in one of my projects doesn't have an engines property so the apm/npm check is erroring with a TypeError: Cannot read property 'atom' of undefined. It would be convenient if buildCommand could just fall through and try subsequent commands rather than just failing.

Also, looks like the second if fs.existsSync @root + '/Makefile' is redundant because it's already checked on the previous line

Atom.Object.defineProperty.get is deprecated in build-view.js:71

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/usr/share/atom/resources/app/src/atom.js:55:11)
BuildView.detach (/mnt/devel/devel/atom-build/lib/build-view.js:53:9)
BuildView.visibleFromConfig (/mnt/devel/devel/atom-build/lib/build-view.js:71:32)
Config.observeKeyPath (/usr/share/atom/resources/app/src/config.js:571:9)
Config.observe (/usr/share/atom/resources/app/src/config.js:133:21)
new BuildView (/mnt/devel/devel/atom-build/lib/build-view.js:21:17)
Object.activate (/mnt/devel/devel/atom-build/lib/build.js:37:22)
Package.activateNow (/usr/share/atom/resources/app/src/package.js:227:27)
<unknown> (/usr/share/atom/resources/app/src/package.js:213:28)
Package.measure (/usr/share/atom/resources/app/src/package.js:159:15)
Package.activate (/usr/share/atom/resources/app/src/package.js:207:14)
PackageManager.activatePackage (/usr/share/atom/resources/app/src/package-manager.js:404:21)
PackageManager.activatePackages (/usr/share/atom/resources/app/src/package-manager.js:393:14)
PackageManager.activate (/usr/share/atom/resources/app/src/package-manager.js:379:19)
Atom.startEditorWindow (/usr/share/atom/resources/app/src/atom.js:601:21)
Object.<anonymous> (/usr/share/atom/resources/app/src/window-bootstrap.js:12:8)
Object.<anonymous> (/usr/share/atom/resources/app/src/window-bootstrap.js:23:4)
Module._compile (module.js:468:26)
Object..js (module.js:486:10)
Module.load (/usr/share/atom/resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
Function.Module._load (module.js:318:12)
Module.require (module.js:373:17)
require (module.js:392:17)
window.onload (file:///usr/share/atom/resources/app/static/index.js:59:25)

Rust Build Not Working on Windows

Building a rust project on windows still tries to use sh. This also breaks custom build configurations since the built in one seems to override the custom options.

Clearing failed build

If keepVisible is false, and a build fails (so the red error bar is shown). If the area is cleared (using the trash can icon), then the whole panel is removed. This should only clear the window, not remove the panel.

console panel

Hello,

nice package! Yet the current UI is quite intrusive:

  • it doesn't really fit with the rest of the UI
  • it makes it impossible to keep working when its building

Could you use the console/bottom pane to output the build logs and make it possible to keep working when its building?

Thanks!

Warning: spawn ENOENT

I have a project built on grunt, grunt-contrib-jade, grunt-contrib-sass, etc.
While running atom-build in Atom I get a warning, and building terminates:

Executing with sh: grunt 
Running "jade:compile" (jade) task
>> 37 files created.

Running "sass:dist" (sass) task
Warning: spawn ENOENT� Use --force to continue.

Aborted due to warnings.

If I run "grunt" command in a terminal, everything works fine. Any suggestion?

Copy from build window

Although I can select text, it does not seem possible to copy text output from the build window. It is not possible to bring up the context menu, and Cmd-C does not get the text onto the clipboard.

Is this fixable?

HTML in build output is not escaped

Any HTML, or HTML's reserved characters, in the build output is used as-is, making some things ‘dissappear’.

For instance, when I build some C++ code and I get a warning that includes a bit of code that uses templates, in the raw log I would see:

[...]std::vector<unsigned char>[...]

But in the log window I only get to see:

[...]std::vector[...]

Since the <...> is interpreted as HTML. (Using the inspector I can confirm this as I have an <unsigned char> HTML ‘element’.)

Can't build Rust (cargo) project.

Hello,

I'm getting the following error message when building a cargo project on Windows 7 x64:

Build error

cargo and rustc are both included in the %PATH% directory (they run fine from command prompt and git sh).

Any ideas what could be the problem?

Copy text

Hi :)

first: Thanks for this great plugin. It's pretty nice!
One thing that could it make even more awesome is the capability to select and copy text from the output pane. When I run a build and it fails I'd like to be able to select parts of the output and hit cmd+c (copy shortcut) and paste the result somewhere else. While I can select text, it won't let me copy the text.

I'm not entirely sure if this is an issue with this plugin though.

Support for multiple tree roots?

First of all, this is a great plugin. I really appreciate the ability to build/run a file and see the results directly below.

Currently, it only searches the first root folder in the tree-view for .atom-build.json files. I was working on a file in another root folder, with its own config file, and kept getting messages about the first root folder. Could we perhaps search only the root folder with the active file? Or is there a better solution to this?

Use makefile in subdirectory instead of project root

Hello, I love this tool. I work with multiple components in one project, and I use multiple Makefiles in subdirectories of project. When I open the folder of the project, atom-build uses the makefile in project directory. Can I make it use the closest makefile to the ACTIVE_FILE?

gulp not found on windows

I just installed atom-build. I have a Project with a gulpfie.js.

When I Trigger a build gulp cannot be found, because just "gulp" is being searched for as an executable in the path. Windows seems to only look for gulp.exe oder gulp.com, but my path contains a gulp.cmd instead.

Error match for cargo

I'm not sure where this should be placed in the code exactly, but the following regex seems to do the job for Cargo:

^(?<file>[^\\.]+.rs):(?<line>\\d+):(?<col>\\d+):

Out of source build (cmake)

It would be great if out of source build will be added. In project documentation how to set up error much in that case.

Prefixing the value of `cwd` to the file of matched errors

I am using an .atom-build.json that sets the cwd property ... it looks like this:

{
  "cmd": "fstar",
  "args": [ "{FILE_ACTIVE_NAME}" ],
  "cwd": "{FILE_ACTIVE_PATH}",
  "sh": false,
  "errorMatch": "(?<file>[^\\(]+.fst)\\((?<line>\\d+),(?<col>\\d+).*\\n"
}

The command I'm using, fstar, reports error locations relative to the working directory from which it isi executed, as usual.

However, this doesn't work well with atom-build, since it expects the matches <file> string to be relative to the root of the project.

Is there a way to configure atom-build so that it uses the cwd value in .atom-build.json (if set) to be the base of any matched files in error messages.

Add default `PATH` in settings

As per discussed at gitter.

Currently atom-build doesn't support PATH export from .bashrc, .zshrc etc. It would be helpful if default PATH can be configured at settings so that I won't have to create .atom-build.json on every and each projects.

Minimized Height option is ignored

When I change Minimized Height in settings, it does not apply unless I have checked "Keep Visible". Also after restarting Atom the height goes back to default but the value in settings remains the same.

Atom: 0.166.0
OS: Ubuntu 14.04

Not building from package/grunt on linux

so basically i have a working package.json Gruntfile.coffee combo on the root of the project. hotkey doesn't work, command from pallette doesn't work, lightning button from build ui doesn't work, no errors anywhere.

atom-build.json worked intermitently.

im using atom 0.138.0 and the up to date package

Can I build a single file? Not a project

If this isn't something you want to support, that's fine. But I'll tell you my use-case.

I have sublime text setup so that anytime I ever save a .coffee file, it builds it into a .js file.

It's great, I never need to set up any grunt/gulp build.
But I don't know how to do this with atom

Command Palette not opening with atom-build enabled

When atom-build is enabled it seems to break the Command Palette.

See info here. atom/atom#4318

Atom 0.152.0
MacOS X 10.10 Yosemite

Failed to activate package named 'command-palette' Error: The `::command` method is no longer available on SpacePen views."

Please subscribe to commands via `atom.commands.add`:
https://atom.io/docs/api/latest/CommandRegistry#instance-add

Collect the returned subscription objects in a CompositeDisposable:
https://atom.io/docs/api/latest/CompositeDisposable

Call `.dispose()` on your `CompositeDisposable` in this view's `::detached` hook.
    at CommandPaletteView.$.fn.command (/Users/jongretar/.atom/packages/build/node_modules/space-pen/lib/space-pen.js:570:11)
    at CommandPaletteView.module.exports.SelectListView.initialize (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/node_modules/atom-space-pen-views/lib/select-list-view.js:80:12)
    at CommandPaletteView.module.exports.CommandPaletteView.initialize (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/lib/command-palette-view.js:26:47)
    at CommandPaletteView.View (/Users/jongretar/.atom/packages/build/node_modules/space-pen/lib/space-pen.js:178:25)
    at CommandPaletteView.SelectListView (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/node_modules/atom-space-pen-views/lib/select-list-view.js:18:51)
    at new CommandPaletteView (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/lib/command-palette-view.js:16:55)
    at Function.module.exports.CommandPaletteView.activate (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/lib/command-palette-view.js:20:14)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:227:27)
    at /Applications/Atom.app/Contents/Resources/app/src/package.js:656:29
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:71:11)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:224:20)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:156:19)
    at Ipc.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:35:30)
    at Ipc.emit (events.js:107:17)
    at process.<anonymous> (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/ipc.js:22:29)
    at process.emit (events.js:110:17)

Jump to file line

I find myself wanting to be able to jump to a specific file / fileline when a build fails (of course). And Was wondering if it was possible to hotkey something to jump to a file specified when my build fails and jump to a specific line and set my cursor to it.

I don't think all makefiles/compiler stuff make the same things, but I use cl (visual studio's compiler) to compile my code and from top to bottom it lists the full path the file and the file line in parenthesis.

EX in my compile:
z:\workspace\singularity\src\singularity.cpp(61) : error C2065: 'test' : undeclared identifier
z:\workspace\singularity\src\singularity.cpp(61) : error C2143: syntax error : missing ';' before 'if'

this happens when I write this:

test

if(!Memory->IsInitilized)
{
}

Notice no semicolon after test and no type definition.

definitely would make coding more streamlined than having to alt+g and type in line number, and make sure I'm in the correct file.

Single-file builds

It'd be handy if this package could also handle single-file builds, where the currently open filename will need to be passed to the custom command.
Even more handy would be a way to set this up without the config file in the directory; this could potentially be accomplished by associating custom commands with file types in the package's settings page.

Args don't get reset when falling through build commands

I have a package.json but it doesn't include engines.node or engines.apm and build is (correctly) falling through and seeing that I also have a Makefile. However, args is getting set to [ '--color=always', 'install' ] by https://github.com/noseglid/atom-build/blob/master/lib/build.coffee#L40

So it's trying to run make --color=always install and I'm seeing this:

make: unrecognised option '--color=always'
Usage: make [options] [target] ...
Options:
[clip]

I'm guessing it just needs an args = [] in the grunt and make bits wherever exec is also being set.

View closing automatically

I am not sure if I just do not know how to configure it, but the build view closes automatically if the build is successful. It would be nice if we could check the results of the build file even if the build is successful.

Add support for multiple build commands

It would be great if we could define multiple build commands in .atom-build.json instead of just one. This would allow e.g. creating separate bindings for different commands, like make and make test.

I've seen something like this in SciTE where you can assign numbers to different commands and then use Ctrl+N to trigger command N.

Failed to load package named 'build' TypeError: Cannot read property 'prototype' of undefined

Error after Atom startup:

Failed to load package named 'build' TypeError: Cannot read property 'prototype' of undefined
  at Object.module.exports.extends (/home/szx/.atom/packages/build/lib/cscompatability.js:16:26)
  at /home/szx/.atom/packages/build/lib/save-confirm-view.js:11:26
  at Object.<anonymous> (/home/szx/.atom/packages/build/lib/save-confirm-view.js:67:3)
  at Module._compile (module.js:468:26)
  at Object.Module._extensions..js (module.js:486:10)
  at Module.load (/usr/share/atom/resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:318:12)
  at Module.require (module.js:373:17)
  at require (module.js:392:17)
  at Object.<anonymous> (/home/szx/.atom/packages/build/lib/build.js:9:23)
  at Module._compile (module.js:468:26)
  at Object.Module._extensions..js (module.js:486:10)
  at Module.load (/usr/share/atom/resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:318:12)
  at Module.require (module.js:373:17)
  at require (module.js:392:17)
  at Package.module.exports.Package.requireMainModule (/usr/share/atom/resources/app/src/package.js:602:34)
  at /usr/share/atom/resources/app/src/package.js:180:28
  at Package.module.exports.Package.measure (/usr/share/atom/resources/app/src/package.js:157:15)
  at Package.module.exports.Package.load (/usr/share/atom/resources/app/src/package.js:171:12)
  at PackageManager.module.exports.PackageManager.loadPackage (/usr/share/atom/resources/app/src/package-manager.js:339:16)
  at PackageManager.module.exports.PackageManager.loadPackages (/usr/share/atom/resources/app/src/package-manager.js:316:14)
  at Atom.module.exports.Atom.startEditorWindow (/usr/share/atom/resources/app/src/atom.js:602:21)
  at Object.<anonymous> (/usr/share/atom/resources/app/src/window-bootstrap.js:12:8)
  at Object.<anonymous> (/usr/share/atom/resources/app/src/window-bootstrap.js:23:4)
  at Module._compile (module.js:468:26)
  at Object.Module._extensions..js (module.js:486:10)
  at Module.load (/usr/share/atom/resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:318:12)
  at Module.require (module.js:373:17)
  at require (module.js:392:17)
  at window.onload (file:///usr/share/atom/resources/app/static/index.js:59:25)

Atom version: 0.166.0
atom-build version: 0.22.1

Install fails on Windows

I just tried to install atom-build on my windows machine with the following error.
I guess the main reason is the absence of Istat on windows.

Installing “[email protected]” failed.Hide output…

npm WARN excluding symbolic link spec\fixture\node_modules.bin\grunt -> ../grunt-cli/bin/grunt
npm WARN excluding symbolic link spec\fixture\node_modules.bin\gulp -> ../gulp/bin/gulp.js
npm WARN excluding symbolic link spec\fixture\node_modules\grunt-cli\node_modules.bin\nopt -> ../nopt/bin/nopt.js
npm WARN excluding symbolic link spec\fixture\node_modules\grunt\node_modules.bin\cake -> ../coffee-script/bin/cake
npm WARN excluding symbolic link spec\fixture\node_modules\grunt\node_modules.bin\coffee -> ../coffee-script/bin/coffee
npm WARN excluding symbolic link spec\fixture\node_modules\grunt\node_modules.bin\js-yaml -> ../js-yaml/bin/js-yaml.js
npm WARN excluding symbolic link spec\fixture\node_modules\grunt\node_modules.bin\nopt -> ../nopt/bin/nopt.js
npm WARN excluding symbolic link spec\fixture\node_modules\grunt\node_modules.bin\rimraf -> ../rimraf/bin.js
npm WARN excluding symbolic link spec\fixture\node_modules\grunt\node_modules.bin\which -> ../which/bin/which
npm WARN excluding symbolic link spec\fixture\node_modules\grunt\node_modules\js-yaml\node_modules.bin\esparse -> ../esprima/bin/esparse.js
npm WARN excluding symbolic link spec\fixture\node_modules\grunt\node_modules\js-yaml\node_modules.bin\esvalidate -> ../esprima/bin/esvalidate.js
npm WARN excluding symbolic link spec\fixture\node_modules\gulp\node_modules.bin\semver -> ../semver/bin/semver
npm WARN excluding symbolic link spec\fixture\node_modules\gulp\node_modules\chalk\node_modules.bin\has-ansi -> ../has-ansi/cli.js
npm WARN excluding symbolic link spec\fixture\node_modules\gulp\node_modules\chalk\node_modules.bin\strip-ansi -> ../strip-ansi/cli.js
npm WARN excluding symbolic link spec\fixture\node_modules\gulp\node_modules\chalk\node_modules.bin\supports-color -> ../supports-color/cli.js
npm WARN excluding symbolic link spec\fixture\node_modules\gulp\node_modules\tildify\node_modules.bin\user-home -> ../user-home/cli.js
npm WARN excluding symbolic link spec\fixture\node_modules\gulp\node_modules\vinyl-fs\node_modules.bin\mkdirp -> ../mkdirp/bin/cmd.js
npm WARN excluding symbolic link spec\fixture\node_modules\gulp\node_modules\vinyl-fs\node_modules.bin\strip-bom -> ../strip-bom/cli.js
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/ansi-to-html
npm http GET https://registry.npmjs.org/fs-plus
npm http GET https://registry.npmjs.org/atom-space-pen-views
npm http GET https://registry.npmjs.org/temp
npm http 200 https://registry.npmjs.org/temp
npm http 200 https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/lodash/-/lodash-2.4.1.tgz
npm http 200 https://registry.npmjs.org/lodash/-/lodash-2.4.1.tgz
npm http 200 https://registry.npmjs.org/ansi-to-html
npm http GET https://registry.npmjs.org/ansi-to-html/-/ansi-to-html-0.3.0.tgz
npm http 200 https://registry.npmjs.org/ansi-to-html/-/ansi-to-html-0.3.0.tgz
npm http 200 https://registry.npmjs.org/fs-plus
npm http GET https://registry.npmjs.org/fs-plus/-/fs-plus-2.4.0.tgz
npm http 200 https://registry.npmjs.org/atom-space-pen-views
npm http GET https://registry.npmjs.org/atom-space-pen-views/-/atom-space-pen-views-2.0.3.tgz
npm http 200 https://registry.npmjs.org/atom-space-pen-views/-/atom-space-pen-views-2.0.3.tgz
npm http 200 https://registry.npmjs.org/fs-plus/-/fs-plus-2.4.0.tgz
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/space-pen
npm http GET https://registry.npmjs.org/entities
npm http GET https://registry.npmjs.org/fuzzaldrin
npm http GET https://registry.npmjs.org/grim
npm http GET https://registry.npmjs.org/rimraf
npm http 200 https://registry.npmjs.org/mkdirp
npm http 200 https://registry.npmjs.org/entities
npm http GET https://registry.npmjs.org/entities/-/entities-1.1.1.tgz
npm http 200 https://registry.npmjs.org/rimraf
npm http 200 https://registry.npmjs.org/underscore-plus
npm http 200 https://registry.npmjs.org/grim
npm http 200 https://registry.npmjs.org/async
npm http 200 https://registry.npmjs.org/fuzzaldrin
npm http GET https://registry.npmjs.org/async/-/async-0.2.10.tgz
npm http 200 https://registry.npmjs.org/rimraf
npm http 200 https://registry.npmjs.org/entities/-/entities-1.1.1.tgz
npm http 200 https://registry.npmjs.org/async/-/async-0.2.10.tgz
npm http 200 https://registry.npmjs.org/space-pen
npm http GET https://registry.npmjs.org/space-pen/-/space-pen-5.0.1.tgz
npm http GET https://registry.npmjs.org/underscore
npm http 200 https://registry.npmjs.org/space-pen/-/space-pen-5.0.1.tgz
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/coffeestack
npm http 200 https://registry.npmjs.org/underscore
npm http 200 https://registry.npmjs.org/coffeestack
npm http 200 https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/source-map
npm http GET https://registry.npmjs.org/mixto
npm http GET https://registry.npmjs.org/property-accessors
npm http 200 https://registry.npmjs.org/coffee-script
npm http 200 https://registry.npmjs.org/mixto
npm http 200 https://registry.npmjs.org/source-map
npm http 200 https://registry.npmjs.org/property-accessors
npm ERR! Error: ENOENT, lstat 'C:\Users[mydir]\AppData\Local\Temp\apm-install-dir-115016-7640-gzvii9\node_modules\build\node_modules\atom-space-pen-views\node_modules\grim\node_modules\coffeestack\node_modules\source-map\lib\source-map\binary-search.js'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager\bin\node.exe" "c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager\node_modules\npm\bin\npm-cli.js" "--globalconfig" "c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager.apmrc" "--userconfig" "c:\Users[mydir].atom.apmrc" "install" "C:\Users[mydir]\AppData\Local\Temp\d-115016-7640-lesuff\package.tgz" "--target=0.20.0" "--arch=ia32" "--msvs_version=2013"
npm ERR! cwd C:\Users[mydir]AppData\Local\Temp\apm-install-dir-115016-7640-gzvii9
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.4
npm ERR! path C:\Users[mydir]\AppData\Local\Temp\apm-install-dir-115016-7640-gzvii9\node_modules\build\node_modules\atom-space-pen-views\node_modules\grim\node_modules\coffeestack\node_modules\source-map\lib\source-map\binary-search.js
npm ERR! fstream_path C:\Users[mydir]\AppData\Local\Temp\apm-install-dir-115016-7640-gzvii9\node_modules\build\node_modules\atom-space-pen-views\node_modules\grim\node_modules\coffeestack\node_modules\source-map\lib\source-map\binary-search.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR! Error: ENOENT, lstat 'C:\Users[mydir]\AppData\Local\Temp\apm-install-dir-115016-7640-gzvii9\node_modules\build\node_modules\atom-space-pen-views\node_modules\grim\node_modules\coffeestack\node_modules\coffee-script\lib\coffee-script\optparse.js'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager\bin\node.exe" "c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager\node_modules\npm\bin\npm-cli.js" "--globalconfig" "c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager.apmrc" "--userconfig" "c:\Users[mydir].atom.apmrc" "install" "C:\Users[mydir]\AppData\Local\Temp\d-115016-7640-lesuff\package.tgz" "--target=0.20.0" "--arch=ia32" "--msvs_version=2013"
npm ERR! cwd C:\Users[mydir]\AppData\Local\Temp\apm-install-dir-115016-7640-gzvii9
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.4
npm ERR! path C:\Users[mydir]\AppData\Local\Temp\apm-install-dir-115016-7640-gzvii9\node_modules\build\node_modules\atom-space-pen-views\node_modules\grim\node_modules\coffeestack\node_modules\coffee-script\lib\coffee-script\optparse.js
npm ERR! fstream_path C:\Users[mydir]\AppData\Local\Temp\apm-install-dir-115016-7640-gzvii9\node_modules\build\node_modules\atom-space-pen-views\node_modules\grim\node_modules\coffeestack\node_modules\coffee-script\lib\coffee-script\optparse.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager\bin\node.exe" "c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager\node_modules\npm\bin\npm-cli.js" "--globalconfig" "c:\Users[mydir]\AppData\Local\atom\app-0.172.0\resources\app\apm\node_modules\atom-package-manager.apmrc" "--userconfig" "c:\Users[mydir].atom.apmrc" "install" "C:\Users[mydir]\AppData\Local\Temp\d-115016-7640-lesuff\package.tgz" "--target=0.20.0" "--arch=ia32" "--msvs_version=2013"
npm ERR! cwd C:\Users[mydir]\AppData\Local\Temp\apm-install-dir-115016-7640-gzvii9
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.4
npm ERR! code ENOGIT
npm

Cannot get it to run grunt

I suspect you made some updates that made it so that it will no longer work for me.

I also suspect I should make some .atom-build.json but I'm not sure how it should it should be.

My current file is:

{
  "cmd": "grunt",
  "cwd": "/",
  "sh": true
  }
}

However. Nothing happens. Not even an error :/

Support shadow builds

It would be very handy if you could specify a working directory to execute the command when it is different from the project root. This would make it easier to support platforms that building out of source.

Problem to make errorMatch work

Hello,

I'd like to open the source file in fault when an error occurred.
It does not work and I don't know how to check if my regexp matches nothing or wrong file names...
Please help!

Example of output:

Executing with sh: ./waf  install
Waf: Entering directory `/home/mc/dev/codeaster/src/build/release'
[7558/7743] c: bibc/supervis/aster_core_module.c -> build/release/bibc/supervis/aster_core_module.c.1.o
../../bibc/supervis/aster_core_module.c: In function ‘cheksd_’:
../../bibc/supervis/aster_core_module.c:561:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘res’
    res = PyObject_CallMethod(get_sh_pymod(), "checksd", "s#s#", nomsd, lnom, typsd, ltyp);

Content of my .atom-build.json:

{
  "cmd": "./waf",
  "args": ["install"],
  "sh": true,
  "cwd": "{PROJECT_PATH}",
  "env": {
  },
  "errorMatch": "^\\.\\./\\.\\./(?<file>.*.c):(?<line>\\d+):(?<col>\\d+):"
}

When it will work I will send a PR for a lib/tools/waf.js.

Thanks in advance!

Save file(s) before starting build

It would be nice if atom-build could save files before building.

I imagine something like the following in the package's settings:

  • Save files before building (yes/no)
  • Save (option)
    • all files
    • all files within the current project's file tree
    • just the current file
  • Ask before saving (yes/no)

Atom.Object.defineProperty.get is deprecated in build.js:38

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/usr/share/atom/resources/app/src/atom.js:55:11)
Object.activate (/mnt/devel/devel/atom-build/lib/build.js:38:9)
Package.activateNow (/usr/share/atom/resources/app/src/package.js:227:27)
<unknown> (/usr/share/atom/resources/app/src/package.js:213:28)
Package.measure (/usr/share/atom/resources/app/src/package.js:159:15)
Package.activate (/usr/share/atom/resources/app/src/package.js:207:14)
PackageManager.activatePackage (/usr/share/atom/resources/app/src/package-manager.js:404:21)
PackageManager.activatePackages (/usr/share/atom/resources/app/src/package-manager.js:393:14)
PackageManager.activate (/usr/share/atom/resources/app/src/package-manager.js:379:19)
Atom.startEditorWindow (/usr/share/atom/resources/app/src/atom.js:601:21)
Object.<anonymous> (/usr/share/atom/resources/app/src/window-bootstrap.js:12:8)
Object.<anonymous> (/usr/share/atom/resources/app/src/window-bootstrap.js:23:4)
Module._compile (module.js:468:26)
Object..js (module.js:486:10)
Module.load (/usr/share/atom/resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
Function.Module._load (module.js:318:12)
Module.require (module.js:373:17)
require (module.js:392:17)
window.onload (file:///usr/share/atom/resources/app/static/index.js:59:25)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.