Skip to content

Commit

Permalink
refactor changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
taishinaritomi committed Sep 17, 2023
1 parent 7687477 commit af44c5d
Showing 1 changed file with 87 additions and 2 deletions.
89 changes: 87 additions & 2 deletions .changeset/twenty-chairs-dance.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,91 @@
---
"@excss/compiler": minor
"excss": minor
"@excss/compiler": patch
"excss": patch
---

chore: due to the failure of the 0.1.0 npm release

## refactor: rename inject to helper

```diff
// excss.config.ts
import { defineConfig } from "excss/config";

export default defineConfig({
- inject: ``,
+ helper: ``,
});
```

### feat: support for excss.config.ts

#### vite.config.ts

In the updated configuration, we have simplified the excss plugin initialization in `vite.config.ts`. Similar changes are also implemented in Next.js and webpack.

```diff
import Excss from "excss/vite";
import { defineConfig } from "vite";

export default defineConfig({
plugins: [
+ Excss(),
- Excss({
- inject: ``,
- }),
],
});
```

#### excss.config.ts

A new file `excss.config.ts` has been introduced to house the excess configuration settings, which includes the `helper` option.

```diff
+import { defineConfig } from "excss/config";
+
+export default defineConfig({
+ helper: ``,
+});
```

### feat: integrated variants field into inject field

```diff
+import { variants } from "excss/config";

{
- variants: {
- red: "#ff0000",
- },
helper: `
+ ${variants({
+ red: "#ff0000",
+ })}
$breakpoints: (
400: "screen and (max-width: 400px)",
800: "screen and (max-width: 800px)",
1000: "screen and (max-width: 1000px)",
) !default;

@mixin mq($breakpoint) {
@media #{map-get($breakpoints, $breakpoint)} {
@content;
}
}
`,
}
```

### feat: change export method for plugins from named export to default export

```diff
-import { Excss } from "excss/vite";
+import Excss from "excss/vite";

-import { ExcssPlugin } from "excss/webpack";
+import ExcssPlugin from "excss/webpack";

-import { createExcss } from "excss/next";
+import createExcss from "excss/next";
```

0 comments on commit af44c5d

Please sign in to comment.