-
Notifications
You must be signed in to change notification settings - Fork 33
adds ability to ignore git dependencies #45
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ const merge = require("lodash/merge") | |
| const debounce = require("lodash/debounce") | ||
| const { spawn } = require("yarn-or-npm") | ||
| const tar = require("tar") | ||
| const yargs = require('yargs'); | ||
|
|
||
| async function installRelativeDeps() { | ||
| const projectPkgJson = readPkgUp.sync() | ||
|
|
@@ -108,13 +109,17 @@ async function libraryHasChanged(name, libDir, targetDir, hashStore) { | |
|
|
||
| async function findFiles(libDir, targetDir) { | ||
| const ignore = ["**/*", "!node_modules", "!.git"] | ||
| const { argv: { ignoreGit } } = yargs | ||
| .alias('i', 'ignoreGit') | ||
| .describe('ignoreGit', 'ignoring git dependencies'); | ||
|
|
||
| // TODO: use resolved paths here | ||
| if (targetDir.indexOf(libDir) === 0) { | ||
| // The target dir is in the lib directory, make sure that path is excluded | ||
| ignore.push("!" + targetDir.substr(libDir.length + 1).split(path.sep)[0]) | ||
| } | ||
| const files = await globby(ignore, { | ||
| gitignore: true, | ||
| gitignore: !ignoreGit, | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I read this correctly, I'm confused by the name now, |
||
| cwd: libDir, | ||
| nodir: true | ||
| }) | ||
|
|
||
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.
Could you register the option in cli.js instead of inline in this function? Otherwise the option would be shown in the help etc.