@viji-dev/sdk 1.0.7 → 1.0.8

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
@@ -42,7 +42,7 @@ Create a new scene in the `scenes/` folder.
42
42
  - `viji create my-scene --renderer shader` — GLSL fragment shader
43
43
  - `viji create my-scene --ts` — TypeScript scene file (works with any renderer)
44
44
 
45
- On the first run, the SDK installs type definitions locally for IDE autocompletion. This creates `node_modules/`, `package.json`, `global.d.ts`, and `tsconfig.json` files in your workspace — all auto-generated, no manual setup needed. Each scene gets its own `tsconfig.json` so scenes don't interfere with each other in your editor.
45
+ On the first run, the SDK installs type definitions locally for IDE autocompletion. This creates `node_modules/` and `package.json` in your workspace, and `tsconfig.json` + `global.d.ts` inside each scene folder — all auto-generated, no manual setup needed. Each scene is isolated so they don't interfere with each other in your editor.
46
46
 
47
47
  ### `viji dev [--port <port>] [--host <host>] [--open]`
48
48
 
@@ -84,16 +84,16 @@ my-viji-scenes/
84
84
  ├── scenes/
85
85
  │ ├── my-scene/
86
86
  │ │ ├── main.js
87
- │ │ └── tsconfig.json # per-scene IDE config (auto-generated)
87
+ │ │ ├── global.d.ts # type definitions (auto-generated)
88
+ │ │ └── tsconfig.json # IDE config (auto-generated)
88
89
  │ ├── shader-demo/
89
90
  │ │ └── main.glsl
90
91
  │ └── p5-sketch/
91
92
  │ ├── main.js
93
+ │ ├── global.d.ts
92
94
  │ └── tsconfig.json
93
- ├── global.d.ts # IDE type support (auto-generated)
94
- ├── tsconfig.json # shared compiler options (auto-generated)
95
- ├── node_modules/ # type definitions (auto-generated)
96
- └── package.json # auto-generated
95
+ ├── node_modules/ # type packages (auto-generated)
96
+ └── package.json # auto-generated
97
97
  ```
98
98
 
99
99
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viji-dev/sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "description": "Professional toolkit for creating interactive Viji scenes",
6
6
  "keywords": [
@@ -33,7 +33,7 @@
33
33
  "url": "https://github.com/viji-dev/sdk/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@viji-dev/core": "^0.3.32",
36
+ "@viji-dev/core": "^0.3.33",
37
37
  "chokidar": "^4.0.0",
38
38
  "commander": "^12.0.0",
39
39
  "ws": "^8.18.0"
@@ -5,7 +5,7 @@ import { execSync } from 'child_process';
5
5
  import { getSceneTemplate, getGlobalDtsContent, getSceneFileExtension, VALID_RENDERERS } from '../../templates/scene-templates.js';
6
6
  import { validateProjectName } from '../utils/cli-utils.js';
7
7
 
8
- const ROOT_TSCONFIG = JSON.stringify({
8
+ const SCENE_TSCONFIG = JSON.stringify({
9
9
  compilerOptions: {
10
10
  target: 'ESNext',
11
11
  module: 'ESNext',
@@ -14,11 +14,7 @@ const ROOT_TSCONFIG = JSON.stringify({
14
14
  noEmit: true,
15
15
  strict: false,
16
16
  },
17
- }, null, 2) + '\n';
18
-
19
- const SCENE_TSCONFIG = JSON.stringify({
20
- extends: '../../tsconfig.json',
21
- include: ['.', '../../global.d.ts'],
17
+ include: ['.'],
22
18
  }, null, 2) + '\n';
23
19
 
24
20
  function ensureCoreTypes(cwd) {
@@ -67,23 +63,11 @@ export async function createCommand(sceneName, options) {
67
63
  console.log(`Created scene: scenes/${sceneName}/${mainFile} [${renderer} renderer]`);
68
64
 
69
65
  if (renderer !== 'shader' && ensureCoreTypes(cwd)) {
70
- const globalDtsPath = join(cwd, 'global.d.ts');
71
- if (!existsSync(globalDtsPath)) {
72
- const dtsContent = getGlobalDtsContent(renderer);
73
- if (dtsContent) {
74
- await writeFile(globalDtsPath, dtsContent);
75
- }
76
- }
77
-
78
- const rootTsconfigPath = join(cwd, 'tsconfig.json');
79
- if (!existsSync(rootTsconfigPath)) {
80
- await writeFile(rootTsconfigPath, ROOT_TSCONFIG);
81
- }
82
-
83
- const sceneTsconfigPath = join(scenePath, 'tsconfig.json');
84
- if (!existsSync(sceneTsconfigPath)) {
85
- await writeFile(sceneTsconfigPath, SCENE_TSCONFIG);
66
+ const dtsContent = getGlobalDtsContent(renderer);
67
+ if (dtsContent) {
68
+ await writeFile(join(scenePath, 'global.d.ts'), dtsContent);
86
69
  }
70
+ await writeFile(join(scenePath, 'tsconfig.json'), SCENE_TSCONFIG);
87
71
  }
88
72
 
89
73
  console.log('');
@@ -107,8 +107,8 @@ void main() {
107
107
  };
108
108
 
109
109
  const GLOBAL_DTS = {
110
- native: '/// <reference path="node_modules/@viji-dev/core/dist/artist-global.d.ts" />\n',
111
- p5: '/// <reference path="node_modules/@viji-dev/core/dist/artist-global-p5.d.ts" />\n',
110
+ native: '/// <reference path="../../node_modules/@viji-dev/core/dist/artist-global.d.ts" />\n',
111
+ p5: '/// <reference path="../../node_modules/@viji-dev/core/dist/artist-global-p5.d.ts" />\n',
112
112
  shader: null,
113
113
  };
114
114