-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move toolkit environment setting to a command (#67)
## Description Instead of setting the environment on module import, it is now done in a command that needs to be called manually.
- Loading branch information
Showing
1 changed file
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
export-env { | ||
$env.NUPM_HOME = ($env.FILE_PWD | path join _nupm_dev) | ||
$env.NUPM_CACHE = ($env.FILE_PWD | path join _nupm_dev cache) | ||
$env.NUPM_TEMP = ($env.FILE_PWD | path join _nupm_dev tmp) | ||
export def --env set-nupm-env [] { | ||
$env.NUPM_HOME = ('./_nupm_dev' | path expand) | ||
$env.NUPM_CACHE = ('./_nupm_dev/cache' | path expand) | ||
$env.NUPM_TEMP = ('./_nupm_dev/tmp' | path expand) | ||
|
||
$env.PATH ++= [($env.FILE_PWD | path join _nupm_dev scripts)] | ||
$env.NU_LIB_DIRS ++= [($env.FILE_PWD | path join _nupm_dev modules)] | ||
$env.PATH ++= [('./_nupm_dev/scripts' | path expand)] | ||
$env.NU_LIB_DIRS ++= [('./_nupm_dev/modules' | path expand)] | ||
|
||
print $'NUPM_HOME: ($env.NUPM_HOME)' | ||
print $'NUPM_CACHE: ($env.NUPM_CACHE)' | ||
print $'NUPM_TEMP: ($env.NUPM_TEMP)' | ||
print $'PATH: ($env.PATH)' | ||
print $'NU_LIB_DIRS: ($env.NU_LIB_DIRS)' | ||
print-nupm-env | ||
} | ||
|
||
export def print-nupm-env [] { | ||
print $'NUPM_HOME: ($env.NUPM_HOME?)' | ||
print $'NUPM_CACHE: ($env.NUPM_CACHE?)' | ||
print $'NUPM_TEMP: ($env.NUPM_TEMP?)' | ||
print $'PATH: ($env.PATH?)' | ||
print $'NU_LIB_DIRS: ($env.NU_LIB_DIRS?)' | ||
} |