Skip to content

Commit

Permalink
Add esbuild, update build + watch scripts, remove node_modules from v…
Browse files Browse the repository at this point in the history
…scode packaging to vastly reduce file count
  • Loading branch information
brandongregoryscott committed May 10, 2021
1 parent e475bdb commit 0864d30
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
19 changes: 11 additions & 8 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
.vscode/**
.vscode-test/**
*.test.ts
**/test/*
src/**
.github/**
.gitignore
.vscode-test/**
.vscode/**
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
*.test.ts
**/.eslintrc.json
**/*.map
**/*.ts
examples/**
**/test/*
**/tsconfig.json
esbuild.js
examples/**
node_modules
src/**
vsc-extension-quickstart.md
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"@types/vscode": "1.54.0",
"@typescript-eslint/eslint-plugin": "4.14.1",
"@typescript-eslint/parser": "4.14.1",
"esbuild": "0.11.20",
"eslint": "7.19.0",
"faker": "5.5.3",
"glob": "7.1.6",
Expand Down Expand Up @@ -115,16 +116,19 @@
"url": "https://github.com/brandongregoryscott/kazoo.git"
},
"scripts": {
"build": "tsc --pretty --project tsconfig.json",
"esbuild": "./node_modules/esbuild/bin/esbuild src/extension.ts --bundle --outfile=dist/extension.js --platform=node --external:vscode",
"build": "npm run esbuild -- --sourcemap",
"build:dist": "npm run esbuild -- --minify",
"clean": "rimraf dist **/tmp/*",
"lint": "eslint src --ext ts",
"postpublish": "git add -A && git commit -m \"$npm_package_version\" && git push origin main",
"prebuild": "npm run clean",
"pretest": "npm run build && npm run lint",
"prevscode:publish": "npm run build",
"prevscode:publish": "npm run build:dist",
"test": "node ./dist/test/runTest.js",
"vscode:publish": "vsce package && vsce publish",
"watch": "tsc --pretty --watch --project tsconfig.json"
"vscode:pack": "vsce package",
"vscode:publish": "npm run vscode:package && vsce publish",
"watch": "npm run esbuild -- --sourcemap --watch"
},
"version": "0.1.0"
}
2 changes: 1 addition & 1 deletion src/commands/add-translation-to-culture-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { StringUtils } from "../utilities/string-utils";
import { ConfigUtils } from "../utilities/config-utils";
import { InsertionPosition } from "../enums/insertion-position";
import { WindowUtils } from "../utilities/window-utils";
import * as translate from "@vitalets/google-translate-api";
import translate from "@vitalets/google-translate-api";
import { DEFAULT_LANGUAGE_CODE } from "../constants/language-code-map";
import { Property } from "../types/property";
import { SourceFileUtils } from "../utilities/source-file-utils";
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"esModuleInterop": false,
"esModuleInterop": true,
"lib": ["es6"],
"module": "commonjs",
"outDir": "dist",
Expand Down

0 comments on commit 0864d30

Please sign in to comment.