Skip to content

Commit

Permalink
chore: dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fannheyward committed Apr 4, 2023
1 parent 760a6ae commit 745e2f5
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 67 deletions.
19 changes: 2 additions & 17 deletions esbuild.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* eslint-disable @typescript-eslint/no-var-requires */
async function start(watch) {
async function start() {
await require('esbuild').build({
entryPoints: ['src/index.ts'],
bundle: true,
watch,
minify: process.env.NODE_ENV === 'production',
sourcemap: process.env.NODE_ENV === 'development',
mainFields: ['module', 'main'],
Expand All @@ -14,20 +13,6 @@ async function start(watch) {
});
}

let watch = false;
if (process.argv.length > 2 && process.argv[2] === '--watch') {
console.log('watching...');
watch = {
onRebuild(error) {
if (error) {
console.error('watch build failed:', error);
} else {
console.log('watch build succeeded');
}
},
};
}

start(watch).catch((e) => {
start().catch((e) => {
console.error(e);
});
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
"coc": "^0.0.80"
},
"devDependencies": {
"@types/node-fetch": "^2.5.7",
"@types/tar": "^4.0.2",
"@types/node-fetch": "^2.6.3",
"@types/tar": "^6.1.4",
"@types/tunnel": "^0.0.3",
"@types/unzipper": "^0.10.3",
"@types/unzipper": "^0.10.5",
"@types/which": "^2.0.0",
"coc.nvim": "^0.0.81-next.3",
"esbuild": "^0.12.5",
"coc.nvim": "^0.0.83-next.9",
"esbuild": "^0.17.15",
"node-fetch": "^2.6.0",
"rimraf": "^3.0.0",
"tar": "^6.0.5",
"rimraf": "^4.4.1",
"tar": "^6.1.13",
"tunnel": "^0.0.6",
"typescript": "^4.0.3",
"typescript": "^5.0.3",
"unzipper": "^0.10.11",
"which": "^2.0.2"
},
Expand Down
Loading

0 comments on commit 745e2f5

Please sign in to comment.