Skip to content

Commit

Permalink
fix: svelte whitespace minification
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Mar 24, 2022
1 parent 53ddb47 commit c136c43
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 49 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"semver": "^7.3.5",
"sort-deep-object-arrays": "^1.1.2",
"strip-ansi": "^7.0.0",
"svelte": "^3.46.3",
"svelte": "^3.46.4",
"ts-jest": "^27.1.3",
"typescript": "~4.5.5",
"vite": "^2.7.13",
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"preview": "sirv public --no-clear"
},
"devDependencies": {
"esbuild": "^0.14.13",
"esbuild-svelte": "^0.6.2",
"esbuild": "^0.14.27",
"esbuild-svelte": "^0.6.3",
"has-flag": "^5.0.1",
"sirv-cli": "^2.0.0"
}
Expand Down
18 changes: 5 additions & 13 deletions packages/runtime/src/components/Diagnostic.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,18 @@
<pre class="message">
<span class="plugin" style="color: {checkerColorMap[diagnostic.checkerId]}"
>{`[${diagnostic.checkerId}] `}</span
>
<span class={`message-body message-body-${diagnostic.level}`}>{message}</span>
><span class={`message-body message-body-${diagnostic.level}`}>{message}</span>
</pre>
<pre class="file">
{#if errorSource.linkFiles}
<!-- svelte-ignore a11y-missing-attribute -->
<a
class="file-link"
on:click={errorSource.onclick}>{errorSource.textContent}</a
<!-- svelte-ignore a11y-missing-attribute -->
<pre class="file">{#if errorSource.linkFiles}<a class="file-link" on:click={errorSource.onclick}
>{errorSource.textContent}</a
>
{:else}
{errorSource.text}
{/if}
</pre>
{#if hasFrame}
<pre class="frame">
<code class="frame-code">
{diagnostic.frame}
</code>
</pre>
<pre class="frame"><code class="frame-code">{diagnostic.frame}</code></pre>
{/if}
<pre class="stack">{diagnostic.stack}</pre>
</li>
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-checker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@types/eslint": "^7.2.14",
"@types/lodash.debounce": "^4.0.6",
"@types/lodash.pick": "^4.4.6",
"esbuild": "^0.14.13",
"esbuild": "^0.14.27",
"npm-run-all": "^4.1.5",
"optionator": "^0.9.1",
"vls": "^0.7.6",
Expand Down
16 changes: 4 additions & 12 deletions playground/basic/__tests__/__snapshots__/overlay-true.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,21 @@ exports[`overlay-true overlay prompts and changes 1`] = `"Unexpected var, use le
exports[`overlay-true overlay prompts and changes 2`] = `"<PROJECT_ROOT>/temp/basic/src/main.ts:3:1"`;
exports[`overlay-true overlay prompts and changes 3`] = `
"
1 | import { text } from './text'
" 1 | import { text } from './text'
2 |
> 3 | var hello = 'Hello'
| ^^^^^^^^^^^^^^^^^^^
4 |
5 | const rootDom = document.querySelector('#root')! as HTMLElement
6 | rootDom.innerHTML = hello + text
"
6 | rootDom.innerHTML = hello + text"
`;
exports[`overlay-true overlay prompts and changes 4`] = `
"
1 | import { text } from './text'
" 1 | import { text } from './text'
2 |
> 3 | var hello = 'Hello1'
| ^^^^^^^^^^^^^^^^^^^^
4 |
5 | const rootDom = document.querySelector('#root')! as HTMLElement
6 | rootDom.innerHTML = hello + text
"
6 | rootDom.innerHTML = hello + text"
`;
2 changes: 1 addition & 1 deletion playground/vue2-vls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"eslint": "^7.28.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^7.6.0",
"prettier": "2.3.0",
"prettier": "2.6.0",
"sass": "^1.32.7",
"vite": "^2.7.13",
"vite-plugin-components": "^0.12.2",
Expand Down
32 changes: 13 additions & 19 deletions pnpm-lock.yaml

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

0 comments on commit c136c43

Please sign in to comment.