@ovipakla/gm-cli 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.
Files changed (2) hide show
  1. package/GMFileWatcher.js +4 -1
  2. package/package.json +1 -1
package/GMFileWatcher.js CHANGED
@@ -270,7 +270,10 @@ class GMFileWatcher {
270
270
  : path.join(target, gmFolderName, `${script.name}/${script.name}.${extension}`);
271
271
 
272
272
  if (!fs.existsSync(dst)) {
273
- const dstYY = path.join(target, gmFolderName, `${script.name}/${script.name}.yy`);
273
+ const objName = isObject ? gmFolderName.split("/").slice(-1).pop() : undefined
274
+ const dstYY = isObject
275
+ ? path.join(target, `${objName}.yy`)
276
+ : path.join(target, gmFolderName, `${script.name}/${script.name}.yy`);
274
277
  if (!fs.existsSync(dstYY)) {
275
278
  console.log(`⚠️ File ${dstYY} does not exists, cannot sync.`)
276
279
  return {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.0",
6
+ "version": "1.0.1",
7
7
  "description": "Gamemaker CLI toolkit. Watch & sync gml sources with yyp project.",
8
8
  "main": "app.js",
9
9
  "scripts": {},