old_contents: 'use babel';
  /* @flow */
  
  import install from './installer';
  import child_process from 'child_process';
  import log4js from 'log4js';
  
  const logger = log4js.getLogger('installer');
  
  export function activate () {
  	install();
  }
  
  export function getAutoCompleteProvider(): AutocompleteProvider {
  	logger.trace('Registering auto-complete provider.');
  	return require('./autocomplete-provider').provider;
  }
  
  export function getHyperclickProvider(): HyperclickProvider {
  	logger.trace('Registering hyperclick provider.');
  	return require('./hyperclick-provider').provider;
  }
  
  var toolBarSection = null;
  export function consumeToolBar(toolBar) {
  	logger.trace('Setting up toolbar.');
  
    toolBarSection = toolBar('love-ide');
  	var runButton = toolBarSection.addButton({
  		icon: 'play',
  		tooltip: 'Run Love App',
  		iconset: 'ion',
  		callback() {
  			var [dir] = atom.project.getPaths();
  			child_process.exec('love .', {cwd: dir}, (err, stdout, stderr) => {
  				// TODO: Report error.
  			});
  		}
  	});
  }
  
  export function deactivate() {
  	if (toolBarSection) {
  		toolBarSection.removeItems();
  	}
  }
  
new_contents: 'use babel';
  /* @flow */
  
  import install from './installer';
  import child_process from 'child_process';
  import log4js from 'log4js';
  
  const logger = log4js.getLogger('installer');
  
  export var config = {
  	lovePath: {
  		title: 'Path to Love Executable',
  		description: `This should be the full path to the LOVE executable.
  On OSX, this is likely '/Applications/love.app/Contents/MacOS/love'.
  On Windows, this is likely 'C:\\Program Files (x86)\\LOVE\\love.exe'
  Leave blank to use the executable found in the PATH.`,
  		type: 'string',
  		default: '',
  		order: 1,
  	},
  }
  
  export function activate () {
  	install();
  }
  
  export function getAutoCompleteProvider(): AutocompleteProvider {
  	logger.trace('Registering auto-complete provider.');
  	return require('./autocomplete-provider').provider;
  }
  
  export function getHyperclickProvider(): HyperclickProvider {
  	logger.trace('Registering hyperclick provider.');
  	return require('./hyperclick-provider').provider;
  }
  
  var toolBarSection = null;
  export function consumeToolBar(toolBar) {
  	logger.trace('Setting up toolbar.');
  
    toolBarSection = toolBar('love-ide');
  	var runButton = toolBarSection.addButton({
  		icon: 'play',
  		tooltip: 'Run Love App',
  		iconset: 'ion',
  		callback() {
  			var [dir] = atom.project.getPaths();
  			var lovePath = atom.config.get('love-ide.lovePath') || 'love';
  			child_process.exec(`${lovePath} .`, {cwd: dir}, (err, stdout, stderr) => {
  				if(err) {
  					atom.notifications.addFatalError('Error running LOVE.', {
  						detail: stderr
  					});
  				}
  			});
  		}
  	});
  }
  
  export function deactivate() {
  	if (toolBarSection) {
  		toolBarSection.removeItems();
  	}
  }
  
subject: Allow user to specify path to LOVE executable in config.