diff options
| author | Pig Fang <g-plane@hotmail.com> | 2024-08-10 00:52:23 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-09 18:52:23 +0200 |
| commit | 82884348cb1b424a4c4452ef734bc4e760926b2f (patch) | |
| tree | a64142bb68dc2509dd9ec421a9a88fcec1e6f65e /tests/testdata | |
| parent | 218ee1b1ffebbb53aa82c8ce55e7ee7061342249 (diff) | |
feat(fmt): support CSS, SCSS, Sass and Less (#24870)
This PR integrates [Malva](https://github.com/g-plane/malva) into `deno
fmt`, which introduces the ability to format CSS, SCSS, Sass and Less
files.
On Linux x64 6.10, this PR increases about 800KiB:
```
❯ wc -c target/release/deno
125168728 target/release/deno
❯ wc -c target/release/deno
124349456 target/release/deno
```
Diffstat (limited to 'tests/testdata')
| -rw-r--r-- | tests/testdata/fmt/badly_formatted.css | 2 | ||||
| -rw-r--r-- | tests/testdata/fmt/badly_formatted.md | 6 | ||||
| -rw-r--r-- | tests/testdata/fmt/badly_formatted_fixed.css | 3 | ||||
| -rw-r--r-- | tests/testdata/fmt/badly_formatted_fixed.md | 6 |
4 files changed, 16 insertions, 1 deletions
diff --git a/tests/testdata/fmt/badly_formatted.css b/tests/testdata/fmt/badly_formatted.css new file mode 100644 index 000000000..bfe18b821 --- /dev/null +++ b/tests/testdata/fmt/badly_formatted.css @@ -0,0 +1,2 @@ +#app>.btn{ color : #000 } + diff --git a/tests/testdata/fmt/badly_formatted.md b/tests/testdata/fmt/badly_formatted.md index 05a4b2f97..29d73b365 100644 --- a/tests/testdata/fmt/badly_formatted.md +++ b/tests/testdata/fmt/badly_formatted.md @@ -32,7 +32,7 @@ function foo(): number { { // Comment in JSON "key": "value", - "key2": + "key2": "value2", } @@ -49,3 +49,7 @@ function foo(): number { - item1 - item2 ``` + +```css +#app>.btn{ color : #000 } +``` diff --git a/tests/testdata/fmt/badly_formatted_fixed.css b/tests/testdata/fmt/badly_formatted_fixed.css new file mode 100644 index 000000000..1653551f4 --- /dev/null +++ b/tests/testdata/fmt/badly_formatted_fixed.css @@ -0,0 +1,3 @@ +#app > .btn { + color: #000; +} diff --git a/tests/testdata/fmt/badly_formatted_fixed.md b/tests/testdata/fmt/badly_formatted_fixed.md index 7a7d1913b..db2afc809 100644 --- a/tests/testdata/fmt/badly_formatted_fixed.md +++ b/tests/testdata/fmt/badly_formatted_fixed.md @@ -40,3 +40,9 @@ function foo(): number { - item1 - item2 ``` + +```css +#app > .btn { + color: #000; +} +``` |
