@gustcss/vite 0.6.0 → 0.7.1
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/dist/index.d.ts +48 -0
- package/dist/index.mjs +1 -1
- package/package.json +5 -2
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Plugin } from 'vite'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Options for the GustCSS Vite plugin.
|
|
5
|
+
*/
|
|
6
|
+
export interface GustcssPluginOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Path to the generated CSS file, relative to the Vite project root.
|
|
9
|
+
*
|
|
10
|
+
* @default 'src/styles/utility.css'
|
|
11
|
+
*/
|
|
12
|
+
output?: string
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Glob patterns of source files to scan for utility classes.
|
|
16
|
+
*
|
|
17
|
+
* @default ['./src/**\/*.{js,ts,jsx,tsx,astro,vue}']
|
|
18
|
+
*/
|
|
19
|
+
content?: string[]
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Path to an explicit GustCSS config file. When omitted, the plugin
|
|
23
|
+
* auto-detects a config file and otherwise synthesizes one from `content`.
|
|
24
|
+
*/
|
|
25
|
+
config?: string
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Wrap the generated utilities in `@layer` blocks.
|
|
29
|
+
*/
|
|
30
|
+
outputToCssLayers?: boolean
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Create the GustCSS Vite plugin.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* import { defineConfig } from 'vite'
|
|
39
|
+
* import gustcss from '@gustcss/vite'
|
|
40
|
+
*
|
|
41
|
+
* export default defineConfig({
|
|
42
|
+
* plugins: [gustcss({ output: 'src/styles/utility.css' })],
|
|
43
|
+
* })
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export function cssUtility(opts?: GustcssPluginOptions): Plugin
|
|
47
|
+
|
|
48
|
+
export default cssUtility
|
package/dist/index.mjs
CHANGED
|
@@ -25,7 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
value: mod,
|
|
26
26
|
enumerable: true
|
|
27
27
|
}) : target, mod));
|
|
28
|
-
var __require = /*
|
|
28
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/index.js
|
|
31
31
|
var import_runner = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gustcss/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Vite plugin for GustCSS",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
7
8
|
"type": "module",
|
|
8
9
|
"files": [
|
|
9
10
|
"dist/index.cjs",
|
|
10
11
|
"dist/index.mjs",
|
|
12
|
+
"dist/index.d.ts",
|
|
11
13
|
"README.md",
|
|
12
14
|
"LICENSE"
|
|
13
15
|
],
|
|
14
16
|
"exports": {
|
|
15
17
|
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
16
19
|
"import": "./dist/index.mjs",
|
|
17
20
|
"require": "./dist/index.cjs"
|
|
18
21
|
}
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
"access": "public"
|
|
35
38
|
},
|
|
36
39
|
"dependencies": {
|
|
37
|
-
"gustcss": "^0.
|
|
40
|
+
"gustcss": "^0.7.1"
|
|
38
41
|
},
|
|
39
42
|
"devDependencies": {
|
|
40
43
|
"rolldown": "^1.1.0",
|