This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1103 from caridy/windows
closes #264, #460, #1097, #869 and #1063: adding support for windows; dropping support for nodejs 0.6
- Loading branch information
Showing
12 changed files
with
83 additions
and
46 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 |
---|---|---|
|
@@ -2,7 +2,6 @@ language: node_js | |
node_js: | ||
- "0.10" | ||
- "0.8" | ||
- "0.6" | ||
env: | ||
- "testtype=unit" | ||
- "testtype=func" | ||
|
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2013, Yahoo! Inc. All rights reserved. | ||
* Copyrights licensed under the New BSD License. | ||
* See the accompanying LICENSE file for terms. | ||
*/ | ||
|
||
/*jslint node:true, nomen: true */ | ||
|
||
'use strict'; | ||
|
||
var libpath = require('path'); | ||
|
||
/** | ||
Produces a normalized web path by joining all the parts and normalizing the | ||
filesystem-like path into web compatible url. This is useful when you have to | ||
generate urls based on filesystem path where unix uses `/` and windows uses `\\`. | ||
Node is pretty smart and it will do the heavy lifting, we just need to adjust | ||
the separtor so it uses the `/`. This method also support relative and absolute | ||
paths. | ||
util.webpath('foo/bar' ,'baz'); | ||
// => foo/bar/baz | ||
util.webpath('foo\\bar', 'baz/'); | ||
// => foo/bar/baz/ | ||
util.webpath('./foo/bar', './baz'); | ||
// => foo/bar/baz | ||
util.webpath(['foo', 'bar', 'baz']); | ||
// => foo/bar/baz | ||
@method webpath | ||
@param {Array|String*} url the list of parts to be joined and normalized | ||
@return {String} The joined and normalized url | ||
**/ | ||
exports.webpath = function (url) { | ||
var args = [].concat.apply([], arguments), | ||
parts = libpath.join.apply(libpath, args).split(libpath.sep); | ||
return parts.join('/'); | ||
}; |
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
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
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
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