Skip to content
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

Login with GitHub (WIP) #825

Closed
wants to merge 61 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
75ceddd
#806
knyhle Apr 1, 2019
d96bb51
prettify custom setting json (#812)
knyhle Apr 1, 2019
c0951dc
Install lodash and html-loader
auxves Apr 3, 2019
8f9643e
Add option to open settings
auxves Apr 3, 2019
ed3b9fd
Implement settings page
auxves Apr 3, 2019
43fe4e5
Add option to open settings page
auxves Apr 3, 2019
f68a26e
Add settings html
auxves Apr 3, 2019
560b376
Fix auto upload (#801)
auxves Apr 3, 2019
1e87058
#805
shanalikhan Apr 3, 2019
4aeca8a
#820
shanalikhan Apr 3, 2019
91b6f55
#820
shanalikhan Apr 3, 2019
691c229
#821
shanalikhan Apr 3, 2019
57b4bae
#805
shanalikhan Apr 3, 2019
2d2043f
Add OAuth and landing page
auxves Apr 3, 2019
9200ceb
Add express
auxves Apr 3, 2019
e57f067
Add landing page
auxves Apr 3, 2019
77b0075
--
auxves Apr 3, 2019
277aba2
Merge branch 'github-oauth' into settings-ui
auxves Apr 3, 2019
c4ccbda
Merge OAuth < Settings UI
auxves Apr 3, 2019
9669118
Move to new location
auxves Apr 4, 2019
2e75b2f
Remove asking for token part
auxves Apr 4, 2019
47e066f
Open landing page if token is not configured
auxves Apr 4, 2019
dc0dee3
Save token and gist id
auxves Apr 4, 2019
6460030
Change bg color
auxves Apr 4, 2019
bd14091
Remove docs button to make it look better
auxves Apr 4, 2019
680ffd1
Transfer from html file
auxves Apr 4, 2019
2ad472f
Refactor css and js
auxves Apr 4, 2019
dc5f641
Add scope to view user info
auxves Apr 4, 2019
7acaa6b
Get username to get gists
auxves Apr 4, 2019
b1d5dd5
Remove unnecessary functions
auxves Apr 4, 2019
2a4ae64
#823
auxves Apr 4, 2019
c45b869
WIP. Update to look like Bookmarks extension
auxves Apr 4, 2019
cf2da39
Update
auxves Apr 4, 2019
e1fec91
Add json file for release notes info
auxves Apr 4, 2019
8310476
Require and inject release notes into landing page
auxves Apr 4, 2019
528e718
Improve UI and map changes onto release notes section
auxves Apr 4, 2019
68a4a70
Ignore node_modules and some other files (#826)
auxves Apr 4, 2019
8004516
Merge branch 'v3.2.8' into github-oauth
auxves Apr 4, 2019
5bf6def
Fix certain issues after merge commit
auxves Apr 4, 2019
409e263
Merge branch 'master' of https://github.com/shanalikhan/code-settings…
auxves Apr 4, 2019
6972374
prettify custom setting json (#812)
knyhle Apr 1, 2019
4bfd1c6
Install lodash and html-loader
auxves Apr 3, 2019
5173ca6
Add package.json back after unsuccessful rebase :(
auxves Apr 5, 2019
889f804
Revert accidental changes
auxves Apr 5, 2019
9aeca11
Update settings page
auxves Apr 5, 2019
ffc1869
Switch to using FS to get html content
auxves Apr 5, 2019
146cdd8
Use FS instead of html-loader
auxves Apr 5, 2019
21b3d0b
Update UI
auxves Apr 5, 2019
9389521
Update release notes
auxves Apr 6, 2019
86b8b11
Update commons to work with new UI
auxves Apr 6, 2019
7dc8be6
Update UI
auxves Apr 6, 2019
8fb37ba
Add extension path for oauth service
auxves Apr 6, 2019
4da5263
Allow user to select the gist they want to use
auxves Apr 6, 2019
7a1e7bc
Update UI
auxves Apr 6, 2019
7a187e8
Update name of tab
auxves Apr 6, 2019
cea9c5e
Add tooltips with localized descriptions of each setting
auxves Apr 6, 2019
50ea506
Update docs
auxves Apr 6, 2019
ceef236
Improve tooltips
auxves Apr 6, 2019
2febba0
Improve save indicator
auxves Apr 6, 2019
de57283
Fix warning
auxves Apr 9, 2019
bee53a1
Move header to reusable web component
auxves Apr 9, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 28 additions & 24 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.1.0",
"configurations": [{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/**/*.js"],
"preLaunchTask": "npm"
},
{
"name": "Launch Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test"],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/test/**/*.js"],
"preLaunchTask": "npm"
}
]
"version": "0.1.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/**/*.js"],
"preLaunchTask": "npm"
},
{
"name": "Launch Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/test/**/*.js"],
"preLaunchTask": "npm"
}
]
}
28 changes: 14 additions & 14 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@

// A task runner that calls a custom npm script that compiles the extension.
{
"version": "0.1.0",
"version": "0.1.0",

// we want to run npm
"command": "npm",
// we want to run npm
"command": "npm",

// the command is a shell script
"isShellCommand": true,
// the command is a shell script
"isShellCommand": true,

// show the output window only if unrecognized errors occur.
"showOutput": "silent",
// show the output window only if unrecognized errors occur.
"showOutput": "silent",

// we run the custom script "compile" as defined in package.json
"args": ["run", "compile", "--loglevel", "silent"],
// we run the custom script "compile" as defined in package.json
"args": ["run", "compile", "--loglevel", "silent"],

// The tsc compiler is started in watching mode
"isWatching": true,
// The tsc compiler is started in watching mode
"isWatching": true,

// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"problemMatcher": "$tsc-watch"
}
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"problemMatcher": "$tsc-watch"
}
140 changes: 39 additions & 101 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Settings Sync [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Synchronize%20your%20%40VisualStudio%20%40code%20Settings%20Across%20Multiple%20Machines%20using%20%40github%20GIST%20by%20%40itsShanKhan&url=https://github.com/shanalikhan/code-settings-sync&via=code&hashtags=code,vscode,SettingsSync,developers) [![Follow](https://img.shields.io/twitter/follow/itsShanKhan.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=itsShanKhan)




**Previously known as Visual Studio Code Settings Sync**

[![Version](https://vsmarketplacebadge.apphb.com/version/Shan.code-settings-sync.svg)](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync) [![Travis](https://img.shields.io/travis/rust-lang/rust.svg)](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync)
Expand All @@ -11,7 +8,7 @@

## Support

While being free and open source, if you find it useful, please consider supporting it by donating via PayPal or Open Collective. If you are using it in office as a team, please ask your company to support us via Open Collective from just 2$ per month!
While being free and open source, if you find it useful, please consider supporting it by donating via PayPal or Open Collective. If you are using it in office as a team, please ask your company to support us via Open Collective from just 2\$ per month!

<table align="center" width="60%" border="0">
<tr>
Expand All @@ -38,11 +35,11 @@ While being free and open source, if you find it useful, please consider support
<br>
<br>

**Type Sync in command Palette in order to view all commands.**
**Type `Sync` in command Palette in order to view all commands.**

## Key Features

```
```
1. Use your GitHub account token and Gist.
2. Easy to Upload and Download on one click.
3. Show a summary page at the end with details about config and extensions effected.
Expand All @@ -51,10 +48,11 @@ While being free and open source, if you find it useful, please consider support
6. Share the Gist with other users and let them download your settings.
7. Supports GitHub Enterprise
8. Support pragmas with @sync keywords: host, os and env are supported.
9. GUI for changing settings / logging in
```


## It Syncs

```
All extensions and complete User Folder that Contains
1. Settings File
Expand All @@ -66,90 +64,39 @@ All extensions and complete User Folder that Contains
```

## Shortcuts

```
1. Upload Key : Shift + Alt + U
2. Download Key : Shift + Alt + D
```

## Steps To Get a Personal Access Token from GitHub

This extension requires a Personal Access Token from your GitHub account. You can create one by simply following the steps shown in the pictures below. Make sure you add **Gist** in scope.

**Go to [Settings](https://github.com/settings) / [Developer settings](https://github.com/settings/tokens) / [Personal access tokens](https://github.com/settings/tokens) / Generate New Token**


![Goto Settings / Developer settings / Personal Access Tokens](https://shanalikhan.github.io/img/github1.PNG)

**Select Gist From Scopes.**

![Select Scopes](https://shanalikhan.github.io/img/github2.PNG)

**Get an Access Token.**

![Get Access Token](https://shanalikhan.github.io/img/github3.PNG)


> Save the Token somewhere for future use (i.e. to upload from other machines).


## Upload Your Settings For the first time

**Press Shift + Alt + U it will ask your GitHub account access token.**

> Type ">Sync" In Command Palette into order download / upload

This will automatically open your GitHub settings page, allowing you to generate a new token for the application, as explained in the previous section. This token will allow the extension to create gists.

Enter the GitHub token in the window and click enter.

![github account access token](https://shanalikhan.github.io/img/upload1.png)
When downloading or uploading for the first time, the welcome page will automatically open, where you can log in with GitHub.

**Upload your settings automatically and the extension gives you Gist ID in the system message.**
Gist ID is needed to access the data you have uploaded with your token. Copy this Gist ID in order to download the settings to other machines.
![Login with GitHub](https://user-images.githubusercontent.com/25834068/55663873-93c21280-57d9-11e9-8c24-7088a81ed47c.png)

![uploaded automatically](https://shanalikhan.github.io/img/upload2.png)

You can always **verify created gist** on the following url:

> https://gist.github.com/{your_userName}/{gist_id}

Here is the gif of the complete process when you execute the Upload command (Might take some time to load)

![Upload](https://media.giphy.com/media/xT9IglKxSqs2Wdwq2c/source.gif)
You can always **verify created gist** by going to `https://gist.github.com` and checking for a gist named `cloudSettings`

## Download your Settings

**Press Shift + Alt + D it will ask your GitHub Gist ID.**

> Type ">Sync" In Command Palette into order download / upload

**Enter Your GitHub Token.**

Enter the GitHub token in the window and click enter.
**Login with GitHub**

![github account access token](https://shanalikhan.github.io/img/upload1.png)
**Choose your existing Gist**

**Enter Your Gist ID.**

You need to enter your Gist ID in order to download the files you have uploaded with Shift + Alt + U.

![Enter Your Gist ID](https://shanalikhan.github.io/img/download2.png)
![Existing Gist](https://user-images.githubusercontent.com/25834068/55663880-a9373c80-57d9-11e9-8afc-c0e79cc1b3b5.png)

**Settings Downloaded.**
You are Done! All your files are downloaded

![Enter Your Gist ID](https://shanalikhan.github.io/img/download3.png)

Here is the gif of the complete process when you execute the Download command (Might take time to load)

You are Done! All your files are downloaded

![Download](https://media.giphy.com/media/xT9Iglsi3CS9noE8tW/source.gif)


## Reset Token / Gist Settings

> Type ">Sync" In Command Palette and select Reset Token and Gist Settings
## Reset Extension Settings

> Select **"> Sync : Reset Extension Settings"** in the Command Palette to reset your settings

## Toggle Auto Download

Expand All @@ -174,7 +121,6 @@ Please make sure you have valid github Token and Gist available to make it work

Select Command **"Sync : Advanced Options > Toggle Auto-Upload on Settings Change"** command to Turn ON / OFF the auto-upload.


## Toggle Summary

Summary is **enabled by default** which shows all files and extensions that are added or deleted on a single page.
Expand All @@ -191,9 +137,10 @@ Select Command **"Sync : Advanced Options > Share Settings with Public GIST"**

Other users can give your Gist Id to download the Gist, but they can't upload their settings on your Gist.


## Settings

Settings can be changed through the settings page, which can be accessed through **"> Sync : Advanced Options > Open Settings Page"**

There are two types of settings in Settings Sync.
I will recommend you to read the configurations details [here](https://medium.com/@itsShanKhan/visual-studio-code-settings-sync-configurations-ed8dd6fd9753).

Expand All @@ -204,7 +151,7 @@ You can customize the settings in gist settings like:

```
1. Configure Gist Id (Environment)
2. Configure auto upload / download for Github Gist
2. Configure auto upload / download for Github Gist
3. Configure extension sync behaviour
4. Configure force download
5. Configure quiet sync
Expand Down Expand Up @@ -243,33 +190,26 @@ You can customize the sync:

```json
{
"ignoreUploadFiles": [
"projects.json",
"projects_cache_vscode.json",
"projects_cache_git.json",
"projects_cache_svn.json",
"gpm_projects.json",
"gpm-recentItems.json"
],
"ignoreUploadFolders": [
"workspaceStorage"
],
"ignoreExtensions": [
"ignored_extension_name"
],
"gistDescription": "Visual Studio Code Settings Sync Gist",
"version": 310,
"token": "YOUR_GITHUB_TOKEN_HERE",
"downloadPublicGist": false,
"supportedFileExtensions": [
"json",
"code-snippets"
],
"openTokenLink": true,
"lastUpload": null,
"lastDownload": null,
"githubEnterpriseUrl": null,
"hostName": null
"ignoreUploadFiles": [
"projects.json",
"projects_cache_vscode.json",
"projects_cache_git.json",
"projects_cache_svn.json",
"gpm_projects.json",
"gpm-recentItems.json"
],
"ignoreUploadFolders": ["workspaceStorage"],
"ignoreExtensions": ["ignored_extension_name"],
"gistDescription": "Visual Studio Code Settings Sync Gist",
"version": 310,
"token": "YOUR_GITHUB_TOKEN_HERE",
"downloadPublicGist": false,
"supportedFileExtensions": ["json", "code-snippets"],
"openTokenLink": true,
"lastUpload": null,
"lastDownload": null,
"githubEnterpriseUrl": null,
"hostName": null
}
```

Expand Down Expand Up @@ -299,20 +239,18 @@ Thank you to all our backers! [[Become a backer](https://opencollective.com/code
<a href="https://opencollective.com/code-settings-sync#backers" target="_blank"><img src="https://opencollective.com/code-settings-sync/backers.svg?width=890"></a>
[<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif">](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=4W3EWHHBSYMM8&lc=IE&item_name=Code%20Settings%20Sync&item_number=visual%20studio%20code%20settings%20sync&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)


### Sponsors

Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/code-settings-sync))

## [Contributors](https://github.com/shanalikhan/code-settings-sync/graphs/contributors)

# [Release Notes](https://shanalikhan.github.io/2016/05/14/Visual-studio-code-sync-settings-release-notes.html)

# License


[![Version](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/shanalikhan/code-settings-sync/blob/master/LICENSE)


[![Version](https://vsmarketplacebadge.apphb.com/version/Shan.code-settings-sync.svg)](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync)

[![Installs](https://vsmarketplacebadge.apphb.com/installs/Shan.code-settings-sync.svg)](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync)
Expand Down
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@
"default": false,
"description": "%ext.config.quietSync%"
},
"sync.askGistName": {
"type": "boolean",
"default": false,
"description": "%ext.config.askGistName%"
},
"sync.removeExtensions": {
"type": "boolean",
"default": true,
Expand All @@ -154,9 +149,12 @@
"devDependencies": {
"@types/chai": "4.1.7",
"@types/chokidar": "^2.1.3",
"@types/express": "^4.16.1",
"@types/fs-extra": "^5.0.5",
"@types/lodash": "^4.14.123",
"@types/mocha": "^5.2.6",
"@types/node": "^11.13.0",
"@types/node-fetch": "^2.1.7",
"chai": "^4.2.0",
"clean-webpack-plugin": "^2.0.1",
"mocha": "^6.0.2",
Expand All @@ -171,10 +169,16 @@
},
"dependencies": {
"@octokit/rest": "^16.16.4",
"adm-zip": "^0.4.13",
"chokidar": "^2.1.5",
"const": "^1.0.0",
"express": "^4.16.4",
"fs-extra": "^7.0.1",
"https-proxy-agent": "^2.2.1",
"lockfile": "^1.0.4",
"temp": "^0.9.0"
"lodash": "^4.17.11",
"node-fetch": "^2.3.0",
"temp": "^0.9.0",
"webpack-node-externals": "^1.7.2"
}
}
Loading