-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Extract local path logic and add tests. #341
Merged
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9fb91bc
Extract local path logic and add tests.
zigomir f105cc0
Add official template test.
zigomir 90cb6a7
Add appveyor to run test on Windows.
zigomir 1f15a01
Fix weird race issues.
zigomir a0f0dad
Windows will scandir for template.
6f99a38
Try with cleaned cache.
zigomir 2e1d2af
Try cleaning up cache.
zigomir 6bccb2c
Add missing dev dependencies.
zigomir 83ecf11
Never-ending cache issue :(
zigomir 5b5c67a
Cache only on unique yarn.lock
zigomir 97f3ce4
appveyor I have no more ideas :(
zigomir 51bfd2a
Let it fail on node 5.
zigomir 00b5fd4
It actually fails on node 4.
zigomir 7196464
Node v4 will get npm v2 which fails on windows.
zigomir adb6936
Better regex.
zigomir File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
environment: | ||
matrix: | ||
- nodejs_version: "5" | ||
- nodejs_version: "6" | ||
|
||
install: | ||
- ps: Install-Product node $env:nodejs_version | ||
- npm install | ||
|
||
test_script: | ||
- node --version | ||
- npm --version | ||
- npm test | ||
|
||
cache: | ||
- node_modules -> yarn.lock | ||
|
||
build: off |
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,13 @@ | ||
var path = require('path') | ||
|
||
module.exports = { | ||
isLocalPath: function (templatePath) { | ||
return /^[./]|(^[a-z|A-Z]:)/.test(templatePath) | ||
}, | ||
|
||
getTemplatePath: function (templatePath) { | ||
return path.isAbsolute(templatePath) | ||
? templatePath | ||
: path.normalize(path.join(process.cwd(), templatePath)) | ||
} | ||
} |
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
Empty file.
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
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.
Why is the
|
inside of the[]
necessary?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.
Huh, might not be at all :) (regex by trial and error image here 😊)