@marineyachtradar/signalk-plugin 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/build.js +12 -0
  2. package/package.json +1 -1
package/build.js CHANGED
@@ -157,6 +157,18 @@ function setupGuiFromLocal() {
157
157
  function main() {
158
158
  console.log('=== MaYaRa SignalK Plugin Build ===\n')
159
159
 
160
+ // Skip build if public/ already exists with content (installed from --pack tarball)
161
+ // This prevents postinstall from failing when mayara-gui isn't in node_modules
162
+ if (fs.existsSync(publicDest) && !useLocalGui && !createPack) {
163
+ const files = fs.readdirSync(publicDest)
164
+ if (files.length > 0) {
165
+ console.log(`public/ already exists with ${files.length} files (installed from tarball)`)
166
+ console.log('Skipping build.\n')
167
+ console.log('=== Build complete ===')
168
+ return
169
+ }
170
+ }
171
+
160
172
  // Get GUI assets
161
173
  console.log('Setting up GUI assets...\n')
162
174
  if (useLocalGui) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marineyachtradar/signalk-plugin",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "MaYaRa Radar - Connect SignalK to mayara-server",
5
5
  "main": "plugin/index.js",
6
6
  "scripts": {