Shorten apm paths on Windows

Esse commit está contido em:
Kevin Sawicki
2015-01-20 14:20:02 -08:00
commit 5bf0e53c01
5 arquivos alterados com 12 adições e 7 exclusões
+5 -1
Ver Arquivo
@@ -144,7 +144,11 @@ module.exports = (grunt) ->
cp 'spec', path.join(appDir, 'spec')
cp 'src', path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/
cp 'static', path.join(appDir, 'static')
cp 'apm', path.join(appDir, 'apm'), filter: filterNodeModule
if process.platform is 'win32'
cp path.join('apm', 'node_modules', 'atom-package-manager'), path.join(appDir, 'apm'), filter: filterNodeModule
else
cp 'apm', path.join(appDir, 'apm'), filter: filterNodeModule
if process.platform is 'darwin'
grunt.file.recurse path.join('resources', 'mac'), (sourcePath, rootDirectory, subDirectory='', filename) ->
+1 -1
Ver Arquivo
@@ -1,3 +1,3 @@
#!/bin/sh
"$0/../../app/apm/node_modules/atom-package-manager/bin/node.exe" "$0/../../app/apm/node_modules/atom-package-manager/lib/cli.js" "$@"
"$0/../../app/apm/bin/node.exe" "$0/../../app/apm/lib/cli.js" "$@"
+1 -1
Ver Arquivo
@@ -18,5 +18,5 @@ FOR %%a IN (%*) DO (
IF "%EXPECT_OUTPUT%"=="YES" (
"%~dp0\..\..\atom.exe" %*
) ELSE (
"%~dp0\..\app\apm\node_modules\atom-package-manager\bin\node.exe" "%~dp0\atom.js" %*
"%~dp0\..\app\apm\bin\node.exe" "%~dp0\atom.js" %*
)
+1 -1
Ver Arquivo
@@ -18,5 +18,5 @@ done
if [ $EXPECT_OUTPUT ]; then
"$0/../../../atom.exe" "$@"
else
"$0/../../app/apm/node_modules/atom-package-manager/bin/node.exe" "$0/../atom.js" "$@"
"$0/../../app/apm/bin/node.exe" "$0/../atom.js" "$@"
fi
+4 -3
Ver Arquivo
@@ -128,9 +128,10 @@ class PackageManager
#
# Return a {String} file path to apm.
getApmPath: ->
commandName = 'apm'
commandName += '.cmd' if process.platform is 'win32'
@apmPath ?= path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager', 'bin', commandName)
if process.platform is 'win32'
@apmPath ?= path.resolve(__dirname, '..', 'apm', 'bin', 'apm.cmd')
else
@apmPath ?= path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager', 'bin', 'apm')
# Public: Get the paths being used to look for packages.
#