/*jshint node:true */ 'use strict'; module.exports = function (grunt) { grunt.initConfig({ repo: 'atom/atom-shell', releases: 'https://api.github.com/repos/<%= repo %>/releases', pkg: grunt.file.readJSON('package.json'), meta: { CompanyName: '<%= pkg.author.name %>', FileDescription: '<%= pkg.name %>', FileVersion: '<%= pkg.version %>', InternalName: '<%= pkg.name.toLowerCase() %>.exe', LegalCopyright: 'Copyright (C) <%= grunt.template.' + 'today("yyyy") %> <%= pkg.author.name %>', OriginalFilename: '<%= pkg.name.toLowerCase() %>.exe', ProductName: '<%= pkg.name %>', ProductVersion: '<%= pkg.version %>' }, files: [ 'css/**', 'js/**', 'images/**', 'App.js', 'index.html', 'LICENSE', 'main.js', 'package.json' ], paths: { resources: { win: 'win/resources', mac: 'mac/Atom.app/Contents/Resources', linux: 'linux/resources' }, originalExe: { win: 'win/atom.exe', mac: 'mac/Atom.app', linux: 'linux/atom' }, exe: { win: 'win/<%= pkg.name.toLowerCase() %>.exe', mac: 'mac/<%= pkg.name %>.app', linux: 'linux/<%= pkg.name.toLowerCase() %>' } }, platforms: { win: 'win32-ia32', mac: 'darwin-x64', linux: 'linux-x64' } }); // load tasks defined in grunt/ grunt.loadTasks('grunt'); // create aliases grunt.registerTask( 'build', 'Fetch last shell release and build application', function (platform) { var tasks = [ 'clean:clean-build', 'mkdir:create-build', 'http:find-asset', 'curl:fetch-asset', 'unzip:extract-asset', 'clean:clean-default', 'rename:rename-exe', 'rebrand:rebrand-exe', 'copy:copy-files' ], length = tasks.length, i; for (i = 0; i < length; i += 1) { tasks[i] = tasks[i] + ':' + platform; } grunt.task.run(tasks); } ); grunt.registerTask( 'auto-update', 'Automatically rebuild application whenever a file changes', function (platform) { grunt.task.run('watch:watch-changes:' + platform); } ); };