Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodist looks good, one tweak for powershell users #23

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
v
node_modules
node_modules
*.nupkg
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# nodist
A Node version manager for the windows folks out there. Inspired by [n](https://github.com/visionmedia/n).

## Install
Don't install node beforehand!
Don't install node beforehand! From powershell, you can call "get-command node | select path" to make sure the path environment variable is loading nodist from the correct path.

## Chocolatey Install

1. Install chocolatey: http://chocolatey.org/
2. Run: cinst nodist -pre

## Manual Install

1. Grab the code by unpacking the [zip](https://github.com/marcelklehr/nodist/zipball/master) or using `git clone git://github.com/marcelklehr/nodist.git`.
* Don't put the code in a directory that has a space in it.

2. When you've got the code, add `...path...\nodist\bin` to your path ([how?](http://www.computerhope.com/issues/ch000549.htm)).

Expand Down Expand Up @@ -243,4 +250,4 @@ v0.2.3

* Install latest stable as default version
* Add update command
* Updated npm
* Updated npm
21 changes: 21 additions & 0 deletions chocolatey/nodist.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>nodist</id>
<title>nodist</title>
<version>0.0.4-beta</version>
<authors>Marcel Klehr</authors>
<owners>Marcel Klehr,Frank Schwieterman</owners>
<summary>A Node.js version manager for Windows.</summary>
<description>See github page https://github.com/marcelklehr/nodist for documentation.</description>
<projectUrl>https://github.com/marcelklehr/nodist</projectUrl>
<tags>node nodejs javascript admin</tags>
<copyright>2013</copyright>
<licenseUrl>https://github.com/marcelklehr/nodist</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
</metadata>
<files>
<file src="tools\**" target="tools" />
<!--<file src="content\**" target="content" />-->
</files>
</package>
22 changes: 22 additions & 0 deletions chocolatey/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
$packageName = 'nodist'
$url = 'https://github.com/marcelklehr/nodist/archive/master.zip'
$unzipPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition)

try {

Install-ChocolateyZipPackage $packageName $url $unzipPath
$binPath = (resolve-path (join-path $unzipPath "nodist-master\bin")).ToString()

"Installing nodist at $binPath" | write-host -fore green

Install-ChocolateyPath $binPath 'Machine'

"Running nodist update"
$validExitCodes = @(0)
Start-ChocolateyProcessAsAdmin "$(join-path $binPath "nodist.cmd") update" -validExitCodes $validExitCodes

Write-ChocolateySuccess "$packageName"
} catch {
Write-ChocolateyFailure "$packageName" "$($_.Exception.Message)"
throw
}
3 changes: 3 additions & 0 deletions run_tests.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.\node_modules\.bin\vows %*