This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 230
making mojito to work on windows #1103
Merged
Merged
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
0bc60bd
making store to work with windows filesystem, first stop.
caridy 560d737
adjusting the loader base and root, as well as any asset url generate…
caridy ba97b6a
static handler should use libutil.webpath for prefix computation
caridy 5097b7b
tunnel should normalize the prefixes to make sure that they are web p…
caridy f126bc3
Merge branch 'develop' of github.com:yahoo/mojito into windows
caridy c187e2f
updating history to annotate the support for windows
caridy 88b1fc4
updating history to annotate the support for windows - typo
caridy ca88808
Merge branch 'develop' of github.com:yahoo/mojito into windows
caridy 0484f86
making sure that the id and the name or the res in store are not usin…
caridy 5df1aef
adjusting the 8 failing tests for windows
caridy 65fde85
adjusting history and merging upstream
caridy 0f19d37
making npm test command to work in windows. using ./command is evil, …
caridy 77a5c52
dropping support for nodejs 0.6. from now we only support 0.8 and 0.10+
caridy 4f444ce
history update to reflect the drop of nodejs 0.6
caridy File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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('/'); | ||
}; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file might need a
@module
yuidoc section. (If missing I think its methods get added to the module in the previously processed file 😞 .)