-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web Support & Better Support Message (#205)
* Added clarifying information for checksum install issues * Added web extension * Including app directory in checksum fix * Lint n stuff * Updated changelog & bump version to v88.4-1.6.0
- Loading branch information
1 parent
6e64da6
commit 7c6924b
Showing
7 changed files
with
984 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import * as vscode from "vscode"; | ||
import DokiThemeDefinitions from "./DokiThemeDefinitions"; | ||
import { VSCodeGlobals } from "./VSCodeGlobals"; | ||
import { VSCodeDokiThemeDefinition } from "./extension"; | ||
|
||
|
||
const showNonOp = () => vscode.window | ||
.showInformationMessage( | ||
`This feature does not work on the web version of VSCode 🥲`, | ||
{ title: "That does not work." } | ||
); | ||
|
||
export function activate(context: vscode.ExtensionContext) { | ||
context.subscriptions.push( | ||
vscode.commands.registerCommand("doki-theme.remove.sticker", () => | ||
showNonOp() | ||
) | ||
); | ||
|
||
context.subscriptions.push( | ||
vscode.commands.registerCommand("doki-theme.doki.changelog", () => | ||
showNonOp() | ||
) | ||
); | ||
|
||
context.subscriptions.push( | ||
vscode.commands.registerCommand("doki-theme.remove.watermark", () => | ||
showNonOp() | ||
) | ||
); | ||
|
||
context.subscriptions.push( | ||
vscode.commands.registerCommand("doki-theme.restore.assets", () => | ||
showNonOp() | ||
) | ||
); | ||
|
||
VSCodeGlobals.globalState = context.globalState; | ||
|
||
DokiThemeDefinitions.map((dokiThemeDefinition: VSCodeDokiThemeDefinition) => | ||
dokiThemeDefinition.extensionNames.map((extensionCommand) => ({ | ||
extensionCommand, | ||
dokiThemeDefinition, | ||
})) | ||
) | ||
.reduce((accum, next) => accum.concat(next), []) | ||
.map(({ extensionCommand }) => | ||
vscode.commands.registerCommand(extensionCommand, () => { | ||
showNonOp() | ||
} | ||
) | ||
) | ||
.forEach((disposableHero) => context.subscriptions.push(disposableHero)); | ||
|
||
} | ||
|
||
export function deactivate() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
//@ts-check | ||
'use strict'; | ||
|
||
//@ts-check | ||
/** @typedef {import('webpack').Configuration} WebpackConfig **/ | ||
|
||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
|
||
/** @type WebpackConfig */ | ||
const webExtensionConfig = { | ||
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production') | ||
target: 'webworker', // extensions run in a webworker context | ||
entry: { | ||
'web-extension': './src/web-extension.ts', // source of the web extension main file | ||
}, | ||
output: { | ||
filename: '[name].bundled.js', | ||
path: path.join(__dirname, './out'), | ||
libraryTarget: 'commonjs', | ||
}, | ||
resolve: { | ||
mainFields: ['browser', 'module', 'main'], // look for `browser` entry point in imported node modules | ||
extensions: ['.ts', '.js'], // support ts-files and js-files | ||
alias: { | ||
// provides alternate implementation for node module and source files | ||
}, | ||
fallback: { | ||
// Webpack 5 no longer polyfills Node.js core modules automatically. | ||
// see https://webpack.js.org/configuration/resolve/#resolvefallback | ||
// for the list of Node.js core module polyfills. | ||
assert: require.resolve('assert'), | ||
}, | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts$/, | ||
exclude: [/node_modules/, /out/], | ||
use: [ | ||
{ | ||
loader: 'ts-loader', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new webpack.ProvidePlugin({ | ||
process: 'process/browser', // provide a shim for the global `process` variable | ||
}), | ||
], | ||
externals: { | ||
vscode: 'commonjs vscode', // ignored because it doesn't exist | ||
}, | ||
performance: { | ||
hints: false, | ||
}, | ||
devtool: 'nosources-source-map', // create a source map that points to the original source file | ||
}; | ||
|
||
module.exports = [webExtensionConfig]; |
Oops, something went wrong.