mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Keep apm and atom.sh in app folder
This commit is contained in:
@@ -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) ->
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user