Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Webpack bundling * Build webpack also in CI step, add Test PreLaunch task for local dev * use webpack env plugin to stop neovim winston spam
- Loading branch information
1 parent
6f2e797
commit e0c909b
Showing
9 changed files
with
2,362 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
out | ||
dist | ||
node_modules | ||
yarn-error.log | ||
.vscode-test/ | ||
|
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"ms-vscode.vscode-typescript-tslint-plugin" | ||
] | ||
} | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [] | ||
} |
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 |
---|---|---|
@@ -1,20 +1,88 @@ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Watch", | ||
"type": "npm", | ||
"script": "webpack-dev", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": { | ||
"owner": "typescript", | ||
"source": "ts", | ||
"applyTo": "closedDocuments", | ||
"fileLocation": "absolute", | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "\\[tsl\\] (ERROR|WARNING) in (.*)?\\((\\d+),(\\d+)\\)", | ||
"severity": 1, | ||
"file": 2, | ||
"line": 3, | ||
"column": 4 | ||
}, | ||
{ | ||
"regexp": "\\s*TS(\\d+):\\s*(.*)$", | ||
"code": 1, | ||
"message": 2 | ||
} | ||
], | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": { | ||
"regexp": "Compiling.*?|Compilation .*?starting" | ||
}, | ||
"endsPattern": { | ||
"regexp": "Compiled .*?successfully|Compilation .*?finished" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"label": "Compile - Webpack", | ||
"type": "npm", | ||
"script": "webpack", | ||
"isBackground": false, | ||
"presentation": { | ||
"echo": false, | ||
"reveal": "never", | ||
"focus": false, | ||
"panel": "shared", | ||
"showReuseMessage": false, | ||
"clear": false | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Compile TS", | ||
"type": "npm", | ||
"script": "test-compile", | ||
"isBackground": false, | ||
"presentation": { | ||
"echo": false, | ||
"reveal": "never", | ||
"focus": false, | ||
"panel": "shared", | ||
"showReuseMessage": false, | ||
"clear": false | ||
}, | ||
"problemMatcher": "$tsc" | ||
}, | ||
{ | ||
"label": "Test PreLaunch", | ||
"dependsOn": ["Compile TS", "Compile - Webpack"], | ||
"dependsOrder": "parallel" | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
out/test/** | ||
out/ | ||
node_modules | ||
src/** | ||
.gitignore | ||
vsc-extension-quickstart.md | ||
**/tsconfig.json | ||
**/tslint.json | ||
**/*.map | ||
**/*.ts |
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,50 @@ | ||
//@ts-check | ||
|
||
"use strict"; | ||
|
||
const path = require("path"); | ||
|
||
const webpack = require("webpack"); | ||
|
||
/**@type {import('webpack').Configuration}*/ | ||
const config = { | ||
target: "node", // vscode extensions run in a Node.js-context π -> https://webpack.js.org/configuration/node/ | ||
|
||
entry: "./src/extension.ts", // the entry point of this extension, π -> https://webpack.js.org/configuration/entry-context/ | ||
output: { | ||
// the bundle is stored in the 'dist' folder (check package.json), π -> https://webpack.js.org/configuration/output/ | ||
path: path.resolve(__dirname, "dist"), | ||
filename: "extension.js", | ||
libraryTarget: "commonjs2", | ||
devtoolModuleFilenameTemplate: "../[resource-path]", | ||
}, | ||
devtool: "source-map", | ||
externals: { | ||
vscode: "commonjs vscode", // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, π -> https://webpack.js.org/configuration/externals/ | ||
}, | ||
resolve: { | ||
// support reading TypeScript and JavaScript files, π -> https://github.com/TypeStrong/ts-loader | ||
extensions: [".ts", ".js"], | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts$/, | ||
exclude: /node_modules/, | ||
use: [ | ||
{ | ||
loader: "ts-loader", | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new webpack.EnvironmentPlugin({ | ||
// stop neovim winston spam | ||
NVIM_NODE_LOG_LEVEL: "error", | ||
ALLOW_CONSOLE: true, | ||
}), | ||
], | ||
}; | ||
module.exports = config; |
Oops, something went wrong.