@needle-tools/needle-component-compiler 1.0.0 → 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/Changelog.md +12 -0
- package/dist/MaterialColorHandler.cs +11 -0
- package/package.json +2 -3
- package/src/component-compiler.js +3 -0
- package/src/component-compiler.ts +4 -1
- package/src/types.js +2 -0
package/Changelog.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this package will be documented in this file.
|
|
3
|
+
|
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [1.0.1] - 2022-05-29
|
|
8
|
+
- disable all warnings for generated scripts
|
|
9
|
+
- add mesh and texture types
|
|
10
|
+
|
|
11
|
+
## [1.0.0] - 2022-04-22
|
|
12
|
+
- initial release
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/needle-component-compiler",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Compile mock unity components from typescript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,6 +16,5 @@
|
|
|
16
16
|
"name": "Needle",
|
|
17
17
|
"email": "help@needle.tools",
|
|
18
18
|
"url": "https://needle.tools/"
|
|
19
|
-
}
|
|
20
|
-
"license": "ISC"
|
|
19
|
+
}
|
|
21
20
|
}
|
|
@@ -208,6 +208,9 @@ function run(program, outputDir, sourceFile) {
|
|
|
208
208
|
console.log("Found class: ", name_2);
|
|
209
209
|
var newContext = new ExportContext(outputDir, name_2 + ".cs");
|
|
210
210
|
newContext.appendLine("// auto generated code - do not edit");
|
|
211
|
+
newContext.appendLine("");
|
|
212
|
+
newContext.appendLine("#pragma warning disable");
|
|
213
|
+
newContext.appendLine("");
|
|
211
214
|
newContext.appendLine("namespace Needle.Typescript.GeneratedComponents");
|
|
212
215
|
newContext.appendLine("{");
|
|
213
216
|
newContext.indentLevel += 1;
|
|
@@ -223,7 +223,10 @@ export function run(program: ts.Program, outputDir: string, sourceFile: ts.Sourc
|
|
|
223
223
|
const name = dec.name.escapedText;
|
|
224
224
|
console.log("Found class: ", name);
|
|
225
225
|
const newContext = new ExportContext(outputDir, name + ".cs");
|
|
226
|
-
newContext.appendLine("// auto generated code - do not edit")
|
|
226
|
+
newContext.appendLine("// auto generated code - do not edit directly");
|
|
227
|
+
newContext.appendLine("");
|
|
228
|
+
newContext.appendLine("#pragma warning disable");
|
|
229
|
+
newContext.appendLine("");
|
|
227
230
|
newContext.appendLine("namespace Needle.Typescript.GeneratedComponents");
|
|
228
231
|
newContext.appendLine("{");
|
|
229
232
|
newContext.indentLevel += 1;
|
package/src/types.js
CHANGED
|
@@ -37,6 +37,8 @@ const dict = {
|
|
|
37
37
|
// Rendering
|
|
38
38
|
"Renderer" : "UnityEngine.Renderer",
|
|
39
39
|
"Material" : "UnityEngine.Material",
|
|
40
|
+
"Mesh" : "UnityEngine.Mesh",
|
|
41
|
+
"Texture" : "UnityEngine.Texture",
|
|
40
42
|
// UI
|
|
41
43
|
"Text" : "UnityEngine.UI.Text",
|
|
42
44
|
"Image" : "UnityEngine.UI.Image",
|