@joystick.js/cli-canary 0.0.0-canary.149 → 0.0.0-canary.150
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/dist/lib/dev/index.js +1 -2
- package/package.json +1 -1
- package/src/lib/dev/index.js +1 -3
package/dist/lib/dev/index.js
CHANGED
|
@@ -342,7 +342,7 @@ const getWatchChangeContext = (event = "", path2 = "") => {
|
|
|
342
342
|
const isAddDirectory = event === "addDir" && isExistingDirectoryInSource && !isExistingDirectoryInBuild;
|
|
343
343
|
const isFileToCopy = !!filesToCopy.find((fileToCopy) => fileToCopy.path === path2);
|
|
344
344
|
const isExistingFileInSource = isFile && fs.existsSync(path2);
|
|
345
|
-
const isAddingOrChangingFile =
|
|
345
|
+
const isAddingOrChangingFile = ["add", "change"].includes(event) && isExistingFileInSource;
|
|
346
346
|
return {
|
|
347
347
|
isHTMLUpdate,
|
|
348
348
|
isUIPath,
|
|
@@ -373,7 +373,6 @@ const startFileWatcher = (options = {}) => {
|
|
|
373
373
|
process.loader.text("Rebuilding app...");
|
|
374
374
|
}
|
|
375
375
|
const watchChangeContext = getWatchChangeContext(event, path2);
|
|
376
|
-
console.log("ON ALL CHANGES", watchChangeContext);
|
|
377
376
|
handleCopyDirectory(watchChangeContext, path2, options);
|
|
378
377
|
handleCopyFile(watchChangeContext, path2, options);
|
|
379
378
|
handleAddDirectory(watchChangeContext, path2, options);
|
package/package.json
CHANGED
package/src/lib/dev/index.js
CHANGED
|
@@ -413,7 +413,7 @@ const getWatchChangeContext = (event = '', path = '') => {
|
|
|
413
413
|
const isAddDirectory = event === 'addDir' && isExistingDirectoryInSource && !isExistingDirectoryInBuild;
|
|
414
414
|
const isFileToCopy = !!filesToCopy.find((fileToCopy) => fileToCopy.path === path);
|
|
415
415
|
const isExistingFileInSource = isFile && fs.existsSync(path);
|
|
416
|
-
const isAddingOrChangingFile = event
|
|
416
|
+
const isAddingOrChangingFile = ["add", "change"].includes(event) && isExistingFileInSource;
|
|
417
417
|
|
|
418
418
|
return {
|
|
419
419
|
isHTMLUpdate,
|
|
@@ -451,8 +451,6 @@ const startFileWatcher = (options = {}) => {
|
|
|
451
451
|
|
|
452
452
|
const watchChangeContext = getWatchChangeContext(event, path);
|
|
453
453
|
|
|
454
|
-
console.log('ON ALL CHANGES', watchChangeContext);
|
|
455
|
-
|
|
456
454
|
handleCopyDirectory(watchChangeContext, path, options);
|
|
457
455
|
handleCopyFile(watchChangeContext, path, options);
|
|
458
456
|
handleAddDirectory(watchChangeContext, path, options);
|