-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from mbehr1/fix/typo_and_pkg_upd
fix: typo vsc-lfs
- Loading branch information
Showing
14 changed files
with
15,071 additions
and
10,684 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: run ext unit tests | ||
on: | ||
pull_request: | ||
branches: [master] | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "lts/*" | ||
- name: Install dependencies | ||
run: npm install | ||
- run: xvfb-run -a npm run test | ||
if: runner.os == 'Linux' | ||
- run: npm run test | ||
if: runner.os != 'Linux' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"connor4312.esbuild-problem-matchers", | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules/ | ||
esbuild.mjs | ||
.vscode/** | ||
.vscode-test/** | ||
out/test/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import * as esbuild from 'esbuild' | ||
|
||
const production = process.argv.includes('--production') | ||
const watch = process.argv.includes('--watch') | ||
|
||
async function main() { | ||
const ctx = await esbuild.context({ | ||
entryPoints: [{ out: 'extension', in: 'src/extension.ts' }], | ||
bundle: true, | ||
format: 'cjs', | ||
minify: production, | ||
sourcemap: !production, | ||
sourcesContent: false, | ||
platform: 'node', | ||
// outdir: 'out', | ||
outfile: 'out/extension.js', // .cjs leads to errors in vsce package... | ||
external: ['vscode'], | ||
logLevel: 'silent', | ||
plugins: [ | ||
/* add to the end of plugins array */ | ||
esbuildProblemMatcherPlugin, | ||
], | ||
}) | ||
if (watch) { | ||
await ctx.watch() | ||
} else { | ||
await ctx.rebuild() | ||
await ctx.dispose() | ||
} | ||
} | ||
|
||
/** | ||
* @type {import('esbuild').Plugin} | ||
*/ | ||
const esbuildProblemMatcherPlugin = { | ||
name: 'esbuild-problem-matcher', | ||
|
||
setup(build) { | ||
build.onStart(() => { | ||
console.log('[watch] build started') | ||
}) | ||
build.onEnd((result) => { | ||
result.errors.forEach(({ text, location }) => { | ||
console.error(`✘ [ERROR] ${text}`) | ||
console.error(` ${location.file}:${location.line}:${location.column}:`) | ||
}) | ||
console.log('[watch] build finished') | ||
}) | ||
}, | ||
} | ||
|
||
main().catch((e) => { | ||
console.error(e) | ||
process.exit(1) | ||
}) |
Oops, something went wrong.