@unocss/astro 0.50.8 → 0.51.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 CHANGED
@@ -2,53 +2,9 @@
2
2
 
3
3
  The UnoCSS integration for [Astro](https://astro.build/). Check [the example](../../examples/astro/).
4
4
 
5
- ## Installation
5
+ ## Documentation
6
6
 
7
- ```bash
8
- npm i -D unocss
9
- ```
10
-
11
- ```ts
12
- // astro.config.ts
13
- import UnoCSS from 'unocss/astro'
14
-
15
- export default {
16
- integrations: [
17
- UnoCSS({ /* options */ }),
18
- ],
19
- }
20
- ```
21
-
22
- ### Presetless usage
23
-
24
- > This plugin does not come with any default presets.
25
- > If you are building a meta framework on top of UnoCSS, see [this file](https://github.com/unocss/unocss/blob/main/packages/unocss/src/astro.ts) for an example to bind the default presets.
26
-
27
- ```bash
28
- npm i -D @unocss/astro
29
- ```
30
-
31
- ```ts
32
- // astro.config.mjs
33
- import UnoCSS from '@unocss/astro'
34
-
35
- export default {
36
- integrations: [
37
- UnoCSS({
38
- presets: [
39
- /* no presets by default */
40
- ],
41
- /* options */
42
- }),
43
- ],
44
- }
45
- ```
46
-
47
- for more details, please refer to the [Vite plugin](../vite).
48
-
49
- ## Notes
50
-
51
- [`client:only`](https://docs.astro.build/en/reference/directives-reference/#clientonly) components must be placed in [`components`](https://docs.astro.build/en/core-concepts/project-structure/#srccomponents) folder or added to UnoCSS's `extraContent` config in order to be processed.
7
+ Please refer to the [documentation](https://unocss.dev/integrations/astro).
52
8
 
53
9
  ## License
54
10
 
package/dist/index.cjs CHANGED
@@ -11,7 +11,7 @@ const VitePlugin__default = /*#__PURE__*/_interopDefaultLegacy(VitePlugin);
11
11
  function UnoCSSAstroIntegration(options = {}, defaults) {
12
12
  const {
13
13
  injectEntry = true,
14
- injectReset: includeReset = true,
14
+ injectReset = false,
15
15
  injectExtra = []
16
16
  } = options;
17
17
  return {
@@ -25,8 +25,8 @@ function UnoCSSAstroIntegration(options = {}, defaults) {
25
25
  (_b = config.vite).plugins || (_b.plugins = []);
26
26
  config.vite.plugins.push(...VitePlugin__default(options, defaults));
27
27
  const injects = [];
28
- if (includeReset) {
29
- const resetPath = typeof includeReset === "string" ? includeReset : "@unocss/reset/tailwind.css";
28
+ if (injectReset) {
29
+ const resetPath = typeof injectReset === "string" ? injectReset : "@unocss/reset/tailwind.css";
30
30
  injects.push(`import "${resetPath}"`);
31
31
  }
32
32
  if (injectEntry) {
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ interface AstroIntegrationConfig<Theme extends {} = {}> extends VitePluginConfig
6
6
  /**
7
7
  * Include reset styles
8
8
  * When passing `true`, `@unocss/reset/tailwind.css` will be used
9
- * @default true
9
+ * @default false
10
10
  */
11
11
  injectReset?: string | boolean;
12
12
  /**
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import VitePlugin from '@unocss/vite';
5
5
  function UnoCSSAstroIntegration(options = {}, defaults) {
6
6
  const {
7
7
  injectEntry = true,
8
- injectReset: includeReset = true,
8
+ injectReset = false,
9
9
  injectExtra = []
10
10
  } = options;
11
11
  return {
@@ -19,8 +19,8 @@ function UnoCSSAstroIntegration(options = {}, defaults) {
19
19
  (_b = config.vite).plugins || (_b.plugins = []);
20
20
  config.vite.plugins.push(...VitePlugin(options, defaults));
21
21
  const injects = [];
22
- if (includeReset) {
23
- const resetPath = typeof includeReset === "string" ? includeReset : "@unocss/reset/tailwind.css";
22
+ if (injectReset) {
23
+ const resetPath = typeof injectReset === "string" ? injectReset : "@unocss/reset/tailwind.css";
24
24
  injects.push(`import "${resetPath}"`);
25
25
  }
26
26
  if (injectEntry) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/astro",
3
- "version": "0.50.8",
3
+ "version": "0.51.0",
4
4
  "description": "UnoCSS integration for Astro",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -37,9 +37,9 @@
37
37
  "dist"
38
38
  ],
39
39
  "dependencies": {
40
- "@unocss/core": "0.50.8",
41
- "@unocss/reset": "0.50.8",
42
- "@unocss/vite": "0.50.8"
40
+ "@unocss/core": "0.51.0",
41
+ "@unocss/reset": "0.51.0",
42
+ "@unocss/vite": "0.51.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "astro": "^2.1.9"