@teacss/astro 0.4.6 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -23
- package/dist/index.d.ts +3 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
# @teacss/astro
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
The integration registers the TeaCSS Vite plugin and injects the generated
|
|
8
|
-
stylesheet into Astro pages.
|
|
9
|
-
|
|
10
|
-
Use this package when an Astro application should configure TeaCSS through
|
|
11
|
-
Astro's `integrations` array. It owns the Astro lifecycle and page injection
|
|
12
|
-
around `@teacss/vite`; non-Astro Vite applications should use the Vite
|
|
13
|
-
integration directly.
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
3
|
+
Astro integration for TeaCSS. It registers `@teacss/vite` and injects the
|
|
4
|
+
generated stylesheet into Astro pages.
|
|
16
5
|
|
|
17
6
|
```ts
|
|
18
7
|
import { defineConfig } from "astro/config";
|
|
@@ -23,20 +12,16 @@ export default defineConfig({
|
|
|
23
12
|
});
|
|
24
13
|
```
|
|
25
14
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Use `injectExtra` to keep the default and add other module statements:
|
|
15
|
+
Set `injectEntry: false` to import `virtual:teacss.css` yourself. A string
|
|
16
|
+
`injectEntry` fully replaces the default import and must be a complete module
|
|
17
|
+
statement. Use `injectExtra` to append statements while keeping the default:
|
|
30
18
|
|
|
31
19
|
```ts
|
|
32
20
|
teacss({
|
|
33
|
-
injectExtra: ['import "./src/styles.css";'
|
|
21
|
+
injectExtra: ['import "./src/styles.css";'],
|
|
34
22
|
});
|
|
35
23
|
```
|
|
36
24
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## Status
|
|
25
|
+
Use `@teacss/vite` directly for non-Astro Vite applications.
|
|
40
26
|
|
|
41
|
-
Pre-1.0.
|
|
42
|
-
beside the `teacss` runtime and import it directly from `@teacss/astro`.
|
|
27
|
+
Pre-1.0. Install this adapter beside `teacss`.
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { TeacssVitePluginConfig } from "@teacss/vite";
|
|
|
2
2
|
import { UserConfigDefaults } from "@teacss/core";
|
|
3
3
|
import { AstroIntegration } from "astro";
|
|
4
4
|
//#region src/index.d.ts
|
|
5
|
-
interface AstroIntegrationConfig<Theme extends object = object> extends TeacssVitePluginConfig<Theme> {
|
|
5
|
+
export interface AstroIntegrationConfig<Theme extends object = object> extends TeacssVitePluginConfig<Theme> {
|
|
6
6
|
/**
|
|
7
7
|
* Inject the TeaCSS entry (`import "virtual:teacss.css"`) into every page.
|
|
8
8
|
* Pass complete module code to replace the default statement. A replacement
|
|
@@ -19,6 +19,5 @@ interface AstroIntegrationConfig<Theme extends object = object> extends TeacssVi
|
|
|
19
19
|
*/
|
|
20
20
|
injectExtra?: string[];
|
|
21
21
|
}
|
|
22
|
-
declare function teacss<Theme extends object>(options?: AstroIntegrationConfig<Theme>, defaults?: UserConfigDefaults): AstroIntegration;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { AstroIntegrationConfig, teacss };
|
|
22
|
+
export declare function teacss<Theme extends object>(options?: AstroIntegrationConfig<Theme>, defaults?: UserConfigDefaults): AstroIntegration;
|
|
23
|
+
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teacss/astro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Astro integration for TeaCSS — registers the Vite plugin and injects the generated stylesheet.",
|
|
5
5
|
"homepage": "https://css.teasim.com",
|
|
6
6
|
"funding": "https://github.com/sponsors/billgo",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"dev": "tsdown --watch"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@teacss/core": "0.
|
|
26
|
-
"@teacss/vite": "0.
|
|
25
|
+
"@teacss/core": "0.5.0",
|
|
26
|
+
"@teacss/vite": "0.5.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"astro": "^7.1
|
|
30
|
-
"vite": "^8.
|
|
29
|
+
"astro": "^7.3.1",
|
|
30
|
+
"vite": "^8.2.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"astro": ">=7.0.0",
|