-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
WIP : #258 #666
WIP : #258 #666
Conversation
@@ -193,4 +195,43 @@ export class FileService { | |||
throw err; | |||
} | |||
} | |||
|
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.
add some util methods
@@ -188,6 +188,18 @@ export class Sync { | |||
return matchedFolders.length > 0; | |||
}); | |||
} | |||
const customFileKeys: string[] = Object.keys( |
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.
upload additional files
@@ -437,7 +449,21 @@ export class Sync { | |||
keys.forEach(gistName => { | |||
if (res.data.files[gistName]) { | |||
if (res.data.files[gistName].content) { | |||
if (gistName.indexOf(".") > -1) { | |||
const prefix = FileService.CUSTOMIZED_SYNC_PREFIX; |
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.
download additional files
const fileName = gistName.split(prefix).join(""); // |customized_sync|.htmlhintrc => .htmlhintrc | ||
if (!(fileName in customSettings.customFiles)) { | ||
// syncLocalSettings.json > customFiles doesn't have key | ||
return; |
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.
skip download if does not set download path.
@@ -699,6 +730,7 @@ export class Sync { | |||
"cmd.otherOptions.toggleAutoDownload", | |||
"cmd.otherOptions.toggleSummaryPage", | |||
"cmd.otherOptions.preserve", | |||
"cmd.otherOptions.customizedSync", |
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.
create new advanced option
There should be two options
Uploading the custom file is the same you have done so far. Download custom file when selected The menu should be opened to select the custom files available in the GIST. In this way usr can have multiple files to upload from multiple computers in single GIST |
@shanalikhan Thank you for your review. |
} | ||
} | ||
}, | ||
9: async () => { |
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.
download customized file from gist option
Thanks for your work. |
@tkrtmy I added tests in the PR #667. I used mocha & chai. To avoid conflicts, @shanalikhan could you define a folder structure for tests? As reference test folder in PR |
I have defined the |
@ioprotium I think that I should use this. for example directory
index.ts like this.
@shanalikhan Sorry, In my PR. New feature is monolithically built in sync.ts, not as module. so I can add small test. |
No problem, you can write whatever test you like regarding above feature 😄 Public Wiki edit is enabled. Feel free to create new page with your work explained. |
@tkrtmy I will publish new version in a week or two. |
@shanalikhan And wrote small Test Cases regarding this feature. |
Thanks, Merged! |
You're welcome. |
This is proposal.
Customized sync problem is each machine's path difference.
So be able to set up download path at each machine.
and resolve ↓ issue.
#258
Scenario
1. Add additionaly sync files.
syncLocalSettings.json
append
|customized_sync|
prefix to file's name at gist for identifiyngex.
.eslint
=>|customized_sync|.eslint
2. upload or download them.