@pirireis/webglobeplugins 0.9.4 → 0.9.6

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,7 +1,10 @@
1
1
  {
2
2
  "name": "@pirireis/webglobeplugins",
3
- "version": "0.9.4",
3
+ "version": "0.9.6",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
- "license": "MIT"
6
+ "license": "MIT",
7
+ "scripts": {
8
+ "build": "tsc"
9
+ }
7
10
  }
package/publish.bat ADDED
@@ -0,0 +1,60 @@
1
+ @echo off
2
+ REM Define the source and destination directories
3
+ set SOURCE_DIR=C:\Users\USER\Desktop\webgl\globeNew\my-app\src\webglobeplugins
4
+ set DEST_DIR=C:\Users\USER\Desktop\npmpub\webglobeplugins
5
+ set BUILD_DIR= %DEST_DIR%\dist
6
+ REM --- Start: Prepare and Compile Package for Publishing ---
7
+
8
+ REM Check if the destination directory exists and clean it if it does
9
+ if exist "%DEST_DIR%" (
10
+ echo Cleaning temporary publication directory: "%DEST_DIR%"
11
+ rd /s /q "%DEST_DIR%"
12
+ )
13
+
14
+ REM Create the temporary destination directory if it doesn't exist
15
+ if not exist "%DEST_DIR%" (
16
+ echo Creating temporary publication directory: "%DEST_DIR%"
17
+ mkdir "%DEST_DIR%"
18
+ )
19
+
20
+ REM Create the build directory inside the destination directory
21
+ if not exist "%BUILD_DIR%" (
22
+ echo Creating build directory: "%BUILD_DIR%"
23
+ mkdir "%BUILD_DIR%"
24
+ )
25
+
26
+ REM Copy the entire package folder (including package.json, tsconfig.json, source files)
27
+ REM to the temporary destination. /E copies directories and subdirectories, /I assumes DEST_DIR is a directory.
28
+ REM /Y suppresses prompts to confirm overwriting existing files.
29
+ echo Copying source files to temporary publication directory...
30
+ xcopy /E /I /Y "%SOURCE_DIR%" "%DEST_DIR%\"
31
+
32
+ REM Change to the temporary publication directory
33
+ cd /d "%DEST_DIR%"
34
+
35
+ REM Install dependencies (this is crucial for TypeScript to be available for compilation)
36
+ REM Using 'call' ensures that control returns to the batch script after npm finishes.
37
+ echo Installing package dependencies for compilation...
38
+ call npm install
39
+
40
+ REM Compile TypeScript files into JavaScript
41
+ REM This assumes you have a "build" script in your package.json (e.g., "build": "tsc")
42
+ echo Compiling TypeScript files...
43
+ call npm run build
44
+
45
+ cd /d "%BUILD_DIR%"
46
+
47
+
48
+ REM --- End: Prepare and Compile Package for Publishing ---
49
+
50
+ REM Run npm publish
51
+ REM Because package.json's "files" is set to ["dist"], only the compiled output will be published.
52
+ echo Running npm publish from the compiled package root...
53
+ npm publish
54
+
55
+ REM Return to the original directory
56
+ cd /d "%SOURCE_DIR%"
57
+
58
+ echo Folder copied, compiled, and npm publish executed successfully.
59
+
60
+ set /p exitkey= "Press any key to continue..."
package/tsconfig.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "compilerOptions": {
3
3
  "target": "es2018",
4
4
  "module": "commonjs",
5
- "outDir": "./dist",
5
+ "outDir": "../dist",
6
6
  "strict": true,
7
7
  "esModuleInterop": true,
8
8
  "skipLibCheck": true,
@@ -16,6 +16,7 @@
16
16
  ],
17
17
  "exclude": [
18
18
  "node_modules",
19
- "dist" // Exclude the output directory itself
19
+ "dist", // Exclude the output directory itself
20
+ "./tests/**/*", // Exclude tests directory
20
21
  ]
21
22
  }