{
  "keyboard_shortcut": "", 
  "name": "Build", 
  "language": "JavaScript", 
  "trigger": "", 
  "value": [
    "/**", 
    " * Script to build an xpi, running koext build in the current project root.", 
    " */", 
    "", 
    "var project = ko.macros.current.project;", 
    "var projectDir = ko.interpolate.interpolateString('%p');", 
    "var callback = function() {", 
    "  ko.statusBar.AddMessage('Build complete', 'projects', 5000, true);", 
    "  ko.projects.manager.saveProject(project);", 
    "};", 
    "var osPath = Components.classes[\"@activestate.com/koOsPath;1\"].", 
    "                getService(Components.interfaces.koIOsPath);", 
    "var preprocessedChromePath = osPath.join(projectDir, \"chrome.p.manifest\");", 
    "if (osPath.exists(preprocessedChromePath)) {", 
    "  ko.koextgen.extensionLib.command('build -i chrome.manifest -i chrome.p.manifest ' +", 
    "                                   '-d \"' + projectDir + '\"',", 
    "                                   callback);", 
    "} else {", 
    "  ko.koextgen.extensionLib.command('build -i chrome.manifest ' +", 
    "                                   '-d \"' + projectDir + '\"',", 
    "                                   callback);", 
    "}"
  ], 
  "version": "1.0.12", 
  "rank": 100, 
  "trigger_enabled": false, 
  "async": 1, 
  "type": "macro", 
  "icon": "chrome://fugue/skin/icons/building--plus.png"
}