Keep apm and atom.sh in app folder

This commit is contained in:
Kevin Sawicki
2015-04-08 14:30:32 -07:00
parent 5a8885aeed
commit a61f732cf8
2 changed files with 6 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ module.exports = (grunt) ->
mkdir appDir
if process.platform isnt 'win32'
cp 'atom.sh', path.resolve(appDir, '..', 'atom.sh')
cp 'atom.sh', path.resolve(appDir, '..', 'new-app', 'atom.sh')
cp 'package.json', path.join(appDir, 'package.json')
@@ -147,9 +147,9 @@ module.exports = (grunt) ->
cp 'src', path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/
cp 'static', path.join(appDir, 'static')
cp path.join('apm', 'node_modules', 'atom-package-manager'), path.resolve(appDir, '..', 'apm'), filter: filterNodeModule
cp path.join('apm', 'node_modules', 'atom-package-manager'), path.resolve(appDir, '..', 'new-app', 'apm'), filter: filterNodeModule
if process.platform isnt 'win32'
fs.symlinkSync(path.join('..', '..', 'bin', 'apm'), path.resolve(appDir, '..', 'apm', 'node_modules', '.bin', 'apm'))
fs.symlinkSync(path.join('..', '..', 'bin', 'apm'), path.resolve(appDir, '..', 'new-app', 'apm', 'node_modules', '.bin', 'apm'))
if process.platform is 'darwin'
grunt.file.recurse path.join('resources', 'mac'), (sourcePath, rootDirectory, subDirectory='', filename) ->

View File

@@ -3,7 +3,7 @@ fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
{rm} = require('./task-helpers')(grunt)
{cp, rm} = require('./task-helpers')(grunt)
grunt.registerTask 'generate-asar', 'Generate asar archive for the app', ->
done = @async()
@@ -15,5 +15,7 @@ module.exports = (grunt) ->
asar.createPackageWithOptions appDir, path.resolve(appDir, '..', 'app.asar'), {unpack: '*.node'}, (err) ->
return done(err) if err?
rm appDir
fs.renameSync path.resolve(appDir, '..', 'new-app'), appDir
done()