Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Setup Deno
uses: denolib/setup-deno@v2
with:
deno-version: v1.x
- name: Install dependencies
run: |
npm ci
npm install
npm run build --if-present
- name: Run tests
run: |
Expand All @@ -27,4 +32,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
run: npx semantic-release
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Setup Deno
uses: denolib/setup-deno@v2
with:
deno-version: v1.x
- name: Install dependencies
run: |
npm ci
npm install
npm run build --if-present
- name: Run tests
run: |
npm run test
npm run test
2,144 changes: 2,144 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

21 changes: 16 additions & 5 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if you want to view the source, please visit the github repository of this plugi

const prod = (process.argv[2] === 'production');

esbuild.build({
const buildOptions = {
banner: {
js: banner,
},
Expand Down Expand Up @@ -47,18 +47,29 @@ esbuild.build({
'@lezer/highlight',
'@lezer/lr',
...builtins],
mainFields: ["svelte", "browser", "module", "main"],
mainFields: ["svelte", "browser", "module", "main"],
plugins: [
esbuildSvelte({
compilerOptions: { css: true },
compilerOptions: { css: "injected" },
preprocess: sveltePreprocess(),
})
],
format: 'cjs',
watch: !prod,
target: 'es2020',
logLevel: "info",
sourcemap: prod ? false : 'inline',
treeShaking: true,
outfile: 'main.js',
}).catch(() => process.exit(1));
};

async function runBuild() {
if (prod) {
await esbuild.build(buildOptions);
return;
}

const ctx = await esbuild.context(buildOptions);
await ctx.watch();
}

runBuild().catch(() => process.exit(1));
Loading