@needle-tools/needle-component-compiler 2.0.0-pre → 2.1.0-pre

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 CHANGED
@@ -4,8 +4,8 @@ All notable changes to this package will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [2.0.0-pre] - 2022-11-12
8
- - Add first version of blender scheme compiler
7
+ ## [2.1.0-pre] - 2022-11-12
8
+ - Add blender scheme compiler for creating and updating schemes (or removing them when the component gets deleted)
9
9
 
10
10
  ## [1.9.1] - 2022-11-05
11
11
  - Fix ``new Vector2(1, .5)`` generating invalid C# where number arguments were emitted as double instead of float
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/needle-component-compiler",
3
- "version": "2.0.0-pre",
3
+ "version": "2.1.0-pre",
4
4
  "description": "Compile mock unity components from typescript",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -67,8 +67,9 @@ var BlenderWriter = /** @class */ (function () {
67
67
  }
68
68
  }
69
69
  }
70
- if (!foundInAny) {
70
+ if (!foundInAny && (0, fs_1.existsSync)(previouslyCreated)) {
71
71
  (0, fs_1.unlinkSync)(previouslyCreated);
72
+ (0, commands_1.sendFileDeletedCommand)(previouslyCreated);
72
73
  }
73
74
  }
74
75
  }
package/src/commands.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.sendFileWrittenCommand = exports.sendReloadCommand = void 0;
3
+ exports.sendFileDeletedCommand = exports.sendFileWrittenCommand = exports.sendReloadCommand = void 0;
4
4
  function sendReloadCommand() {
5
5
  process.stdout.write("CMD:reload\r");
6
6
  }
@@ -9,3 +9,7 @@ function sendFileWrittenCommand(path) {
9
9
  process.stdout.write("CMD:writefile " + path + "\r");
10
10
  }
11
11
  exports.sendFileWrittenCommand = sendFileWrittenCommand;
12
+ function sendFileDeletedCommand(path) {
13
+ process.stdout.write("CMD:deletedfile " + path + "\r");
14
+ }
15
+ exports.sendFileDeletedCommand = sendFileDeletedCommand;