Skip to content

Commit

Permalink
Add webpack bundling (#676)
Browse files Browse the repository at this point in the history
* Update issue templates

* add webpack bundling for faster startup

* no conflicts
  • Loading branch information
NavyAdmiral authored and shanalikhan committed Oct 15, 2018
1 parent 6d1b44b commit e68a243
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 156 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ A clear and concise description of what the bug is.

🌴 **Visual Studio Code Version :** [ VERSION_HERE ]
🌴 **Code Settings Sync Version :** [ VERSION_HERE ]
🌴 **Standard or Insiders :** [ _here_ ]
🌴 **OSS or Portable :** [ _here_ ]
🌴 **Operating System :** [ VERSION_HERE ]
🌴 **Occurs On:** [Upload / Download / Help Configuring ]
🌴 **Proxy Enabled:** [ Yes / No ]
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/src/**/*.js"],
"outFiles": ["${workspaceRoot}/out/**/*.js"],
"preLaunchTask": "npm"
},
{
Expand Down
315 changes: 160 additions & 155 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,176 +1,181 @@
{
"name": "code-settings-sync",
"displayName": "Settings Sync",
"description": "Synchronize Settings, Snippets, Themes, File Icons, Launch, Keybindings, Workspaces and Extensions Across Multiple Machines Using GitHub Gist.",
"version": "3.2.0",
"icon": "images/cloud.png",
"publisher": "Shan",
"author": {
"name": "Shan Khan",
"url": "http://shanalikhan.github.io",
"email": "shanalikhan@hotmail.com"
},
"homepage": "https://shanalikhan.github.io",
"galleryBanner": {
"color": "#3B4859",
"theme": "dark"
},
"badges": [
{
"url": "https://vsmarketplacebadge.apphb.com/version/Shan.code-settings-sync.svg",
"description": "Latest Version",
"href": "https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync"
"name": "code-settings-sync",
"displayName": "Settings Sync",
"description": "Synchronize Settings, Snippets, Themes, File Icons, Launch, Keybindings, Workspaces and Extensions Across Multiple Machines Using GitHub Gist.",
"version": "3.2.0",
"icon": "images/cloud.png",
"publisher": "Shan",
"author": {
"name": "Shan Khan",
"url": "http://shanalikhan.github.io",
"email": "shanalikhan@hotmail.com"
},
{
"url": "https://vsmarketplacebadge.apphb.com/installs/Shan.code-settings-sync.svg",
"description": "Total Downloads",
"href": "https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync"
"homepage": "https://shanalikhan.github.io",
"galleryBanner": {
"color": "#3B4859",
"theme": "dark"
},
{
"url": "https://vsmarketplacebadge.apphb.com/rating/Shan.code-settings-sync.svg",
"description": "Ratings",
"href": "https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync"
},
{
"url": "https://img.shields.io/badge/Join%20Community-slack-green.svg",
"description": "Join Slack Community",
"href": "https://join.slack.com/t/codesettingssync/shared_invite/enQtMzE3MjY5NTczNDMwLTYwMTIwNGExOGE2MTJkZWU0OTU5MmI3ZTc4N2JkZjhjMzY1OTk5OGExZjkwMDMzMDU4ZTBlYjk5MGQwZmMyNzk"
}
],
"repository": {
"type": "git",
"url": "https://github.com/shanalikhan/code-settings-sync.git"
},
"bugs": {
"url": "https://github.com/shanalikhan/code-settings-sync/issues",
"email": "shanalikhan@hotmail.com"
},
"engines": {
"vscode": "^1.28.0"
},
"categories": [
"Other"
],
"keywords": [
"vscode-sync",
"vscode-settings-sync",
"code-settings-sync",
"settings-sync",
"workspace-sync",
"multi-root ready"
],
"activationEvents": [
"*"
],
"main": "./out/src/extension",
"contributes": {
"commands": [
{
"command": "extension.HowSettings",
"title": "%cmd.howSetting.title%"
},
"badges": [
{
"command": "extension.downloadSettings",
"title": "%cmd.downloadSettings.title%"
"url": "https://vsmarketplacebadge.apphb.com/version/Shan.code-settings-sync.svg",
"description": "Latest Version",
"href": "https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync"
},
{
"command": "extension.updateSettings",
"title": "%cmd.updateSettings.title%"
"url": "https://vsmarketplacebadge.apphb.com/installs/Shan.code-settings-sync.svg",
"description": "Total Downloads",
"href": "https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync"
},
{
"command": "extension.resetSettings",
"title": "%cmd.resetSettings.title%"
"url": "https://vsmarketplacebadge.apphb.com/rating/Shan.code-settings-sync.svg",
"description": "Ratings",
"href": "https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync"
},
{
"command": "extension.otherOptions",
"title": "%cmd.otherOptions.title%"
"url": "https://img.shields.io/badge/Join%20Community-slack-green.svg",
"description": "Join Slack Community",
"href": "https://join.slack.com/t/codesettingssync/shared_invite/enQtMzE3MjY5NTczNDMwLTYwMTIwNGExOGE2MTJkZWU0OTU5MmI3ZTc4N2JkZjhjMzY1OTk5OGExZjkwMDMzMDU4ZTBlYjk5MGQwZmMyNzk"
}
],
"keybindings": [
{
"key": "alt+shift+u",
"command": "extension.updateSettings"
},
{
"key": "alt+shift+d",
"command": "extension.downloadSettings"
}
"repository": {
"type": "git",
"url": "https://github.com/shanalikhan/code-settings-sync.git"
},
"bugs": {
"url": "https://github.com/shanalikhan/code-settings-sync/issues",
"email": "shanalikhan@hotmail.com"
},
"engines": {
"vscode": "^1.28.0"
},
"categories": [
"Other"
],
"configuration": {
"properties": {
"sync.gist": {
"type": "string",
"default": "",
"description": "%ext.config.gist%"
},
"sync.autoDownload": {
"type": "boolean",
"default": false,
"description": "%ext.config.autoDownload%"
},
"sync.autoUpload": {
"type": "boolean",
"default": false,
"description": "%ext.config.autoUpload%"
"keywords": [
"vscode-sync",
"vscode-settings-sync",
"code-settings-sync",
"settings-sync",
"workspace-sync",
"multi-root ready"
],
"activationEvents": [
"*"
],
"main": "./out/extension",
"contributes": {
"commands": [
{
"command": "extension.HowSettings",
"title": "%cmd.howSetting.title%"
},
"sync.forceDownload": {
"type": "boolean",
"default": false,
"description": "%ext.config.forceDownload%"
{
"command": "extension.downloadSettings",
"title": "%cmd.downloadSettings.title%"
},
"sync.quietSync": {
"type": "boolean",
"default": false,
"description": "%ext.config.quietSync%"
{
"command": "extension.updateSettings",
"title": "%cmd.updateSettings.title%"
},
"sync.askGistName": {
"type": "boolean",
"default": false,
"description": "%ext.config.askGistName%"
{
"command": "extension.resetSettings",
"title": "%cmd.resetSettings.title%"
},
"sync.removeExtensions": {
"type": "boolean",
"default": true,
"description": "%ext.config.removeExtensions%"
{
"command": "extension.otherOptions",
"title": "%cmd.otherOptions.title%"
}
],
"keybindings": [
{
"key": "alt+shift+u",
"command": "extension.updateSettings"
},
"sync.syncExtensions": {
"type": "boolean",
"default": true,
"description": "%ext.config.syncExtensions%"
{
"key": "alt+shift+d",
"command": "extension.downloadSettings"
}
},
"title": "%ext.config.title%"
],
"configuration": {
"properties": {
"sync.gist": {
"type": "string",
"default": "",
"description": "%ext.config.gist%"
},
"sync.autoDownload": {
"type": "boolean",
"default": false,
"description": "%ext.config.autoDownload%"
},
"sync.autoUpload": {
"type": "boolean",
"default": false,
"description": "%ext.config.autoUpload%"
},
"sync.forceDownload": {
"type": "boolean",
"default": false,
"description": "%ext.config.forceDownload%"
},
"sync.quietSync": {
"type": "boolean",
"default": false,
"description": "%ext.config.quietSync%"
},
"sync.askGistName": {
"type": "boolean",
"default": false,
"description": "%ext.config.askGistName%"
},
"sync.removeExtensions": {
"type": "boolean",
"default": true,
"description": "%ext.config.removeExtensions%"
},
"sync.syncExtensions": {
"type": "boolean",
"default": true,
"description": "%ext.config.syncExtensions%"
}
},
"title": "%ext.config.title%"
}
},
"scripts": {
"vscode:prepublish": "npm run tslint-check && npm run compile",
"compile": "webpack --mode production",
"compile:dev": "webpack --mode development",
"compile:watch": "webpack --mode development --watch",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install",
"tslint-check": "tslint -c ./tslint.json ./src/**/*.ts ./src/*.ts",
"format": "prettier --write './src/**/*.ts'",
"test": "npm run vscode:prepublish && node ./node_modules/bin/mocha --recursive"
},
"devDependencies": {
"@types/fs-extra": "^5.0.4",
"@types/node": "^10.11.6",
"@types/chai":"4.1.6",
"@types/mocha": "^5.2.0",
"chai": "^4.2.0",
"mocha": "^5.2.0",
"prettier": "^1.14.3",
"ts-loader": "^5.2.1",
"tslint": "^5.11.0",
"tslint-plugin-prettier": "^2.0.0",
"typescript": "^3.1.2",
"vscode": "^1.1.21",
"webpack": "^4.20.2",
"webpack-cli": "^3.1.2"
},
"dependencies": {
"@octokit/rest": "^15.13.0",
"adm-zip": "^0.4.11",
"chokidar": "^2.0.4",
"fs-extra": "^7.0.0",
"https-proxy-agent": "^2.2.1",
"lockfile": "^1.0.4",
"temp": "^0.8.3"
}
},
"scripts": {
"vscode:prepublish": "npm run tslint-check && npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install",
"tslint-check": "tslint -c ./tslint.json ./src/**/*.ts ./src/*.ts",
"format": "prettier --write './src/**/*.ts'",
"test": "npm run vscode:prepublish && node ./node_modules/bin/mocha --recursive"
},
"devDependencies": {
"@types/fs-extra": "^5.0.4",
"@types/node": "^10.11.6",
"@types/chai":"4.1.6",
"@types/mocha": "^5.2.0",
"chai": "^4.2.0",
"mocha": "^5.2.0",
"prettier": "^1.14.3",
"tslint": "^5.11.0",
"tslint-plugin-prettier": "^2.0.0",
"typescript": "^3.1.2",
"vscode": "^1.1.21"
},
"dependencies": {
"@octokit/rest": "^15.13.0",
"adm-zip": "^0.4.11",
"chokidar": "^2.0.4",
"fs-extra": "^7.0.0",
"https-proxy-agent": "^2.2.1",
"lockfile": "^1.0.4",
"temp": "^0.8.3"
}
}
44 changes: 44 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const path = require('path')
const config = {
target: 'node',
entry: './src/extension.ts',
output: {
path: path.resolve(__dirname, 'out'),
filename: 'extension.js',
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: 'file:///[absolute-resource-path]'
},
devtool: 'source-map',
externals: {
vscode: 'commonjs vscode',
fsevents: 'commonjs fsevents',
'utf-8-validate': 'utf-8-validate',
'bufferutil': 'bufferutil'
},
resolve: {
extensions: ['tsx', '.ts', '.jsx', '.js']
},
node: {
__dirname: false,
__filename: false,
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader'
}
]
},
{
type: 'javascript/auto',
test: /\.mjs$/,
use: []
}
]
}
}
module.exports = config

0 comments on commit e68a243

Please sign in to comment.