-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support absolute path in .bowerrc 'directory' option
fixes #1914
- Loading branch information
Showing
6 changed files
with
59 additions
and
5 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
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,5 @@ | ||
function isAbsolutePath(filePath) { | ||
return filePath.charAt(0) === '/'; | ||
} | ||
|
||
module.exports = isAbsolutePath; |
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,14 @@ | ||
var expect = require('expect.js'); | ||
var isPathAbsolute = require('../../lib/util/isPathAbsolute'); | ||
|
||
describe('isPathAbsolute', function () { | ||
|
||
it('returns true when a path begins with /', function() { | ||
expect(isPathAbsolute('/tmp/foo')).to.be.ok(); | ||
}); | ||
|
||
it('returns false when a path does not begin with /', function() { | ||
expect(isPathAbsolute('./tmp/foo')).to.not.be.ok(); | ||
}); | ||
|
||
}); |