We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18a62ca commit c3967ceCopy full SHA for c3967ce
scripts/build.ts
@@ -0,0 +1,29 @@
1
+import { execSync } from 'node:child_process'
2
+import fs from 'fs-extra'
3
+
4
+async function build() {
5
+ await fs.remove('./out')
6
+ execSync('tsup src/index.ts --format cjs --external vscode --no-shims', { stdio: 'inherit' })
7
8
+ const files = [
9
+ 'LICENSE',
10
+ 'README.md',
11
+ 'snippets',
12
+ '.vscodeignore',
13
+ 'resources',
14
+ 'assets',
15
+ 'syntaxes',
16
+ 'ui'
17
+ ]
18
19
+ for (const f of files)
20
+ {await fs.copy(`./${f}`, `./out/${f}`)}
21
22
+ const json = await fs.readJSON('./package.json')
23
+ delete json.scripts
24
+ delete json.devDependencies
25
+ json.main = 'index.js'
26
+ await fs.writeJSON('./out/package.json', json)
27
+}
28
29
+build()
0 commit comments