From d25b5106a8e3762d8bd0458f7af4f49ff57c27c1 Mon Sep 17 00:00:00 2001 From: Matheus Lenke Date: Sun, 12 Jun 2022 18:18:33 -0300 Subject: [PATCH] fix: build and package extension working --- .vscodeignore | 1 + README.md | 6 +++--- package.json | 17 ++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.vscodeignore b/.vscodeignore index f852c2c..ae50239 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -2,6 +2,7 @@ .vscode-test/** .gitignore out/test/** +node_modules src/** .yarnrc **/tsconfig.json diff --git a/README.md b/README.md index 9ef53e8..1acc595 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ This is all the tools you need installed to run the project and the versions tha ### ⚙️ Initializing * Run `npm run langium:generate` to generate TypeScript code from the grammar definition. - * Run `npm run build` to compile all TypeScript code. + * Run `npm run build` to compile all TypeScript code or `npm run watch` if you want the compiler to work automatically everytime you update your files * Press `F5` to open a new window with your extension loaded. * Create a new file with a file name suffix matching your language. * Verify that syntax highlighting, validation, completion etc. are working as expected. @@ -110,10 +110,10 @@ This is all the tools you need installed to run the project and the versions tha ```bash # Run this to generate .vsix file - vsce package --yarn --pre-release --baseContentUrl none + vsce package --pre-release --baseContentUrl https://github.com/matheuslenke/Tonto # Installing the extension in your vscode (requires the code extension in path) - code --install-extension generatedFile.vsix + code --install-extension tonto-x.x.x.vsix ``` diff --git a/package.json b/package.json index 2e8fc4c..7d1637d 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,13 @@ { "name": "tonto", "displayName": "tonto", - "publisher": "NEMO", + "publisher": "Lenke", "description": "Tonto is a DSL for creating OntoUML models", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", "icon": "docs/images/TontoIcon.png", "repository": { + "type": "git", "url": "https://github.com/matheuslenke/Tonto" }, "engines": { @@ -58,16 +59,14 @@ "bin": { "tonto-cli": "./bin/cli" }, - "main": "./out/main.js", + "main": "./out/extension.js", "scripts": { - "vscode:prepublish": "npm run esbuild-base -- --minify", - "esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node", - "esbuild": "npm run esbuild-base -- --sourcemap", - "esbuild-watch": "npm run esbuild-base -- --sourcemap --watch", + "vscode:prepublish": "npm run clean && tsc --noEmit && npm run lint && node esbuild.js --minify", "package": "vsce package --pre-release --baseContentUrl none", - "build": "tsc -b tsconfig.json", - "watch": "tsc -b tsconfig.json --watch", + "clean": "rimraf out", "lint": "eslint src --ext ts", + "build": "node esbuild.js && tsc --noEmit", + "watch": "node esbuild.js --watch", "langium:generate": "langium generate", "langium:watch": "langium generate --watch" },