Skip to content

Commit

Permalink
extension: package with webpack to fix module not found
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Dec 30, 2023
1 parent a70daba commit f00b202
Showing 15 changed files with 2,140 additions and 190 deletions.
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
}
31 changes: 31 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}/stylua-vscode"],
"outFiles": ["${workspaceFolder}/stylua-vscode/dist/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/stylua-vscode",
"--extensionTestsPath=${workspaceFolder}/stylua-vscode/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/stylua-vscode/out/**/*.js",
"${workspaceFolder}/stylua-vscode/dist/**/*.js"
],
"preLaunchTask": "tasks: watch-tests"
}
]
}
12 changes: 11 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{
"python.formatting.provider": "black"
"python.formatting.provider": "black",
"files.exclude": {
"stylua-vscode/out": false, // set this to true to hide the "out" folder with the compiled JS files
"stylua-vscode/dist": false // set this to true to hide the "dist" folder with the compiled JS files
},
"search.exclude": {
"stylua-vscode/out": true, // set this to false to include "out" folder in search results
"stylua-vscode/dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
43 changes: 43 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// 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": ["$ts-webpack-watch", "$tslint-webpack-watch"],
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}/stylua-vscode"
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build",
"options": {
"cwd": "${workspaceFolder}/stylua-vscode"
}
},
{
"label": "tasks: watch-tests",
"dependsOn": ["npm: watch", "npm: watch-tests"],
"problemMatcher": []
}
]
}
33 changes: 16 additions & 17 deletions stylua-vscode/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
}
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
}
1 change: 1 addition & 0 deletions stylua-vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -3,4 +3,5 @@ npm-debug.log
Thumbs.db
node_modules/
out/
dist/
.vscode-test/
7 changes: 0 additions & 7 deletions stylua-vscode/.vscode/extensions.json

This file was deleted.

34 changes: 0 additions & 34 deletions stylua-vscode/.vscode/launch.json

This file was deleted.

11 changes: 0 additions & 11 deletions stylua-vscode/.vscode/settings.json

This file was deleted.

20 changes: 0 additions & 20 deletions stylua-vscode/.vscode/tasks.json

This file was deleted.

4 changes: 3 additions & 1 deletion stylua-vscode/.vscodeignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.vscode/**
.vscode-test/**
out/test/**
out/**
node_modules/**
src/**
.gitignore
.yarnrc
webpack.config.js
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
Loading

0 comments on commit f00b202

Please sign in to comment.