@tsparticles/nuxt4 4.0.5 → 4.1.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/package.json CHANGED
@@ -1,63 +1,26 @@
1
1
  {
2
2
  "name": "@tsparticles/nuxt4",
3
- "version": "4.0.5",
4
- "type": "module",
3
+ "version": "4.1.0",
5
4
  "repository": {
6
5
  "type": "git",
7
6
  "url": "git+https://github.com/tsparticles/tsparticles.git",
8
7
  "directory": "wrappers/nuxt4"
9
8
  },
10
- "main": "dist/index.js",
11
- "types": "dist/index.d.ts",
9
+ "license": "MIT",
10
+ "type": "module",
11
+ "types": "index.d.ts",
12
+ "main": "index.js",
12
13
  "exports": {
13
14
  ".": {
14
- "types": "./dist/index.d.ts",
15
- "default": "./dist/index.js"
15
+ "types": "./index.d.ts",
16
+ "default": "./index.js"
16
17
  }
17
18
  },
18
- "scripts": {
19
- "build": "prettier --write README.md && pnpm run prettify && tsc -p tsconfig.json",
20
- "build:ci": "prettier --check README.md && pnpm run prettify:ci && tsc -p tsconfig.json",
21
- "lint": "eslint . --max-warnings 0",
22
- "prettify": "prettier --write \"lib/**/*.ts\"",
23
- "prettify:ci": "prettier --check \"lib/**/*.ts\"",
24
- "prepublishOnly": "pnpm run build"
25
- },
26
- "files": [
27
- "dist"
28
- ],
29
- "license": "MIT",
30
- "dependencies": {
31
- "@nuxt/kit": "^4.4.2",
32
- "@tsparticles/engine": "^4.0.5",
33
- "@tsparticles/vue3": "^4.0.5"
34
- },
35
19
  "peerDependencies": {
36
- "nuxt": "^4.0.0"
37
- },
38
- "devDependencies": {
39
- "@eslint/js": "^10.0.1",
40
- "@nuxt/schema": "^4.4.2",
41
- "@typescript-eslint/eslint-plugin": "^8.58.2",
42
- "@typescript-eslint/parser": "^8.58.2",
43
- "eslint": "^10.2.0",
44
- "globals": "^17.5.0",
45
- "nuxt": "^4.4.2",
46
- "typescript": "^6.0.2"
47
- },
48
- "nx": {
49
- "targets": {
50
- "build": {
51
- "inputs": [
52
- "production",
53
- "^production",
54
- "{projectRoot}/lib/**/*"
55
- ]
56
- }
57
- }
20
+ "nuxt": "^4.0.0",
21
+ "@tsparticles/engine": "4.1.0"
58
22
  },
59
23
  "publishConfig": {
60
24
  "access": "public"
61
- },
62
- "gitHead": "4d8b281f8097386714300e39b0004b903f9df87b"
25
+ }
63
26
  }
package/README.md DELETED
@@ -1,56 +0,0 @@
1
- [![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)
2
-
3
- # @tsparticles/nuxt4
4
-
5
- Nuxt 4 module for [@tsparticles/vue3](https://www.npmjs.com/package/@tsparticles/vue3) with client-side registration only.
6
-
7
- This package does not enforce `slim`/`full` presets. The app controls what to load in its own `registerParticles` function.
8
-
9
- ## Installation
10
-
11
- ```bash
12
- pnpm add @tsparticles/nuxt4 @tsparticles/vue3 @tsparticles/engine
13
- ```
14
-
15
- ## Usage
16
-
17
- Add the module in `nuxt.config.ts`:
18
-
19
- ```ts
20
- import { defineNuxtConfig } from "nuxt/config";
21
-
22
- export default defineNuxtConfig({
23
- modules: ["@tsparticles/nuxt4"],
24
- });
25
- ```
26
-
27
- Create `utils/particlesInit.ts`:
28
-
29
- ```ts
30
- import type { Engine } from "@tsparticles/engine";
31
-
32
- export async function registerParticles(engine: Engine): Promise<void> {
33
- const [{ loadSlim }] = await Promise.all([import("@tsparticles/slim")]);
34
-
35
- await loadSlim(engine);
36
- }
37
- ```
38
-
39
- The module loads `~/utils/particlesInit` by default. You can customize it:
40
-
41
- ```ts
42
- import { defineNuxtConfig } from "nuxt/config";
43
-
44
- export default defineNuxtConfig({
45
- modules: ["@tsparticles/nuxt4"],
46
- tsparticles: {
47
- initPath: "~/particles/customInit",
48
- },
49
- });
50
- ```
51
-
52
- ## Notes
53
-
54
- - The module registers `@tsparticles/vue3` only on the client.
55
- - Required export in the init file: `registerParticles(engine)`.
56
- - Keep `registerParticles` focused on your app needs (load only desired plugins/bundles).
File without changes
File without changes