Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use vsce #600

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"test-packages/*"
],
"nohoist": [
"vscode-ui5-language-assistant/@ui5-language-assistant/language-server",
"vscode-ui5-language-assistant/@ui5-language-assistant/language-server/**"
"vscode-ui5-language-assistant/prettier",
"vscode-ui5-language-assistant/@prettier/plugin-xml",
"vscode-ui5-language-assistant/@ui5-language-assistant/language-server"
]
},
"scripts": {
Expand Down
39 changes: 26 additions & 13 deletions packages/vscode-ui5-language-assistant/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,37 @@
# We are bundling our extension so no need to include the dependencies separately.
node_modules

!node_modules/prettier
# !../../node_modules/prettier
!node_modules/@prettier/plugin-xml
!node_modules/@ui5-language-assistant/language-server
# !../../node_modules/@prettier/plugin-xml

# Except a **subset** language-server package which is executed as a separate process
! **/@ui5-language-assistant/language-server/{api.d.ts,CHANGELOG.md,CONTRIBUTING.md,README.md,package.json}
! **/@ui5-language-assistant/language-server/dist/**/*.js
! **/@ui5-language-assistant/language-server/lib/src/**/*.{js,json}
# ! **/@ui5-language-assistant/language-server/{api.d.ts,CHANGELOG.md,CONTRIBUTING.md,README.md,package.json}
# ! **/@ui5-language-assistant/language-server/dist/**/*.js
# ! **/@ui5-language-assistant/language-server/lib/src/**/*.{js,json}

# Except prttier and its plugsin and thier dependencies
# ! **/prettier
# ! **/@prettier/plugin-xml
# ! **/@xml-tools
# ! **/chevrotain
# ! **/regexp-to-ast

# The VSCode Extension's dev artifacts
# Exclude all
**/*
# **/*

# Except mandatory set which should be included in the vsix
! CHANGELOG.md
! CONTRIBUTING.md
! LICENSE
! README.md
! LICENSES/*
! package.json
# ! CHANGELOG.md
# ! CONTRIBUTING.md
# ! LICENSE
# ! README.md
# ! LICENSES/*
# ! package.json

! dist/**/*.js
! lib/src/**/*.{js,json}
! resources/ui5-language-assistant.*
# ! dist/**/*.js
# ! lib/src/**/*.{js,json}
# ! resources/ui5-language-assistant.*
# Readme gifs (resources/readme) linked via jsdeliver instead of part of vsix
5 changes: 4 additions & 1 deletion packages/vscode-ui5-language-assistant/esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ const { join } = require("path");
const { builder } = require("../../esbuild");

builder({
outfile: "dist/extension.js",
outfile: "dist/src/extension.js",
entryPoints: [join(process.cwd(), "src/extension.ts")],
external: [
"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/
"@ui5-language-assistant/language-server",
"prettier",
"@prettier/plugin-xml",
],
});
14 changes: 8 additions & 6 deletions packages/vscode-ui5-language-assistant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"Programming Languages"
],
"license": "Apache-2.0",
"main": "./lib/src/extension",
"main": "./dist/src/extension",
"activationEvents": [
"onFileSystem:manifest-schema",
"*"
"onFileSystem:xml"
],
"contributes": {
"jsonValidation": [
Expand Down Expand Up @@ -94,14 +94,16 @@
"lint": "eslint . --ext .ts --max-warnings=0 --ignore-path=../../.gitignore",
"test:integration": "node lib/test/run-integration-tests.js",
"test:unit": "mocha --config=./test/unit/.mocharc.js",
"coverage:integration": "nyc node lib/test/run-integration-tests.js",
"coverage:integration": "nyc node dist/test/run-integration-tests.js",
"coverage:unit": "nyc mocha --config=./test/unit/.mocharc.js",
"bundle": "node esbuild.js",
"package": "node ./scripts/package-vsix"
"package": "vsce package --yarn"
},
"dependencies": {
"@ui5-language-assistant/language-server": "4.0.9",
"vscode-languageclient": "8.0.2"
"vscode-languageclient": "8.0.2",
"prettier": "2.8.7",
"@prettier/plugin-xml": "2.2.0"
},
"devDependencies": {
"@types/lodash": "4.14.168",
Expand All @@ -111,7 +113,7 @@
"@ui5-language-assistant/user-facing-text": "4.0.5",
"lodash": "4.17.21",
"proxyquire": "2.1.3",
"vsce": "1.83.0",
"vsce": "2.15.0",
"vscode-languageserver": "8.0.2",
"vscode-test": "1.6.1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function main(): Promise<void> {
const extensionDevelopmentPath = resolve(__dirname, "..", "..");
const testPkgFolder = resolve(
extensionDevelopmentPath,
"lib",
"dist",
"test",
"suite"
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const baseConfig = require("../../../../.mocharc.js");
module.exports = {
...baseConfig,
spec: "./lib/test/unit/**/*spec.js",
spec: "./dist/test/unit/**/*spec.js",
};
2 changes: 1 addition & 1 deletion packages/vscode-ui5-language-assistant/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "lib",
"outDir": "dist",
"baseUrl": "."
},
"include": ["src/**/*", "test/**/*", "api.d.ts", "src/manifest/*.json"]
Expand Down