@fluxlay/vite 1.0.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/package.json +34 -0
- package/src/index.ts +25 -0
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fluxlay/vite",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Vite plugin for building Fluxlay wallpapers",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
+
"homepage": "https://fluxlay.com",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"fluxlay",
|
|
9
|
+
"wallpaper",
|
|
10
|
+
"vite",
|
|
11
|
+
"plugin"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "./src/index.ts",
|
|
15
|
+
"types": "./src/index.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"src"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./src/index.ts"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"vite": ">=7"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"typescript": "^5.9.3"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"terser": "^5.46.0"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"check": "biome check --write"
|
|
33
|
+
}
|
|
34
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Plugin } from "vite";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Vite plugin for building Fluxlay plugins.
|
|
5
|
+
* Enforces output directory and minification settings.
|
|
6
|
+
*/
|
|
7
|
+
export function fluxlay(): Plugin {
|
|
8
|
+
return {
|
|
9
|
+
name: "vite-plugin-fluxlay",
|
|
10
|
+
config(userConfig) {
|
|
11
|
+
return {
|
|
12
|
+
base: "./",
|
|
13
|
+
build: {
|
|
14
|
+
outDir: "dist",
|
|
15
|
+
emptyOutDir: true,
|
|
16
|
+
minify: userConfig.build?.minify ?? "terser",
|
|
17
|
+
terserOptions: {
|
|
18
|
+
compress: { drop_console: true },
|
|
19
|
+
mangle: true,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|