Skip to content

Commit d88989d

Browse files
authored
Merge pull request #40 from octref/nobloat
no bloat
2 parents 5452a76 + 79f9f19 commit d88989d

File tree

7 files changed

+6280
-1891
lines changed

7 files changed

+6280
-1891
lines changed

.vscode/launch.json

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
11
// A launch configuration that compiles the extension and then opens it inside a new window
22
{
3-
"version": "0.1.0",
4-
"configurations": [
5-
{
6-
"name": "Launch Extension",
7-
"type": "extensionHost",
8-
"request": "launch",
9-
"runtimeExecutable": "${execPath}",
10-
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
11-
"stopOnEntry": false,
12-
"sourceMaps": true,
13-
"outDir": "${workspaceRoot}/out/src",
14-
"preLaunchTask": "npm"
15-
},
16-
{
17-
"name": "Launch Tests",
18-
"type": "extensionHost",
19-
"request": "launch",
20-
"runtimeExecutable": "${execPath}",
21-
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
22-
"stopOnEntry": false,
23-
"sourceMaps": true,
24-
"outDir": "${workspaceRoot}/out/test",
25-
"preLaunchTask": "npm"
26-
}
27-
]
3+
"version": "0.1.0",
4+
"configurations": [
5+
{
6+
"name": "Launch Polacode",
7+
"type": "extensionHost",
8+
"request": "launch",
9+
"runtimeExecutable": "${execPath}",
10+
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
11+
"stopOnEntry": false
12+
}
13+
]
2814
}

.vscode/settings.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.vscode/tasks.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,23 @@
1515
"snippet",
1616
"share"
1717
],
18-
"engines": {
19-
"vscode": "^1.19.0"
20-
},
2118
"galleryBanner": {
2219
"color": "#fbfbfb",
2320
"theme": "light"
2421
},
2522
"icon": "icon.png",
2623
"categories": ["Other"],
24+
"engines": {
25+
"vscode": "^1.19.0"
26+
},
2727
"activationEvents": ["onCommand:polacode.activate"],
28-
"main": "./out/src/extension",
28+
"main": "./src/extension",
2929
"contributes": {
3030
"commands": [
3131
{
3232
"command": "polacode.activate",
3333
"title": "Polacode 📸"
3434
}
3535
]
36-
},
37-
"scripts": {
38-
"vscode:prepublish": "tsc -p ./",
39-
"compile": "tsc -watch -p ./",
40-
"postinstall": "node ./node_modules/vscode/bin/install"
41-
},
42-
"devDependencies": {
43-
"typescript": "^2.0.3",
44-
"vscode": "^1.0.0",
45-
"mocha": "^2.3.3",
46-
"@types/node": "^6.0.40",
47-
"@types/mocha": "^2.2.32"
4836
}
4937
}

src/extension.ts renamed to src/extension.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import * as vscode from 'vscode'
2-
import * as path from 'path'
3-
import { writeFileSync } from 'fs'
4-
import { homedir } from 'os'
1+
const vscode = require('vscode')
2+
const path = require('path')
3+
const { writeFileSync } = require('fs')
4+
const { homedir } = require('os')
55

66
const writeSerializedBlobToFile = (serializeBlob, fileName) => {
77
const bytes = new Uint8Array(serializeBlob.split(','))
88
writeFileSync(fileName, new Buffer(bytes))
99
}
1010

11-
export function activate(context: vscode.ExtensionContext) {
11+
function activate(context) {
1212
const htmlPath = path.resolve(context.extensionPath, 'src/webview/index.html')
1313
const indexUri = vscode.Uri.file(htmlPath)
1414

@@ -49,7 +49,11 @@ export function activate(context: vscode.ExtensionContext) {
4949
if (type === 'updateBgColor') {
5050
context.globalState.update('polacode.bgColor', data.bgColor)
5151
} else if (type === 'invalidPasteContent') {
52-
vscode.window.showInformationMessage('Pasted content is invalid. Only copy from VS Code and check if your shortcuts for copy/paste have conflicts.')
52+
vscode.window.showInformationMessage(
53+
'Pasted content is invalid. Only copy from VS Code and check if your shortcuts for copy/paste have conflicts.'
54+
)
5355
}
5456
})
5557
}
58+
59+
exports.activate = activate

0 commit comments

Comments
 (0)