Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't trigger when dragging a folder in to the project #330

Open
mathieuspil opened this issue Jul 20, 2019 · 0 comments
Open

Doesn't trigger when dragging a folder in to the project #330

mathieuspil opened this issue Jul 20, 2019 · 0 comments

Comments

@mathieuspil
Copy link

Heya,

First off thank you for the package, it has been of great value to my project.

I am on Mac OSX, and using Gulp 4 with gulp-watch.

Everything seemed to work for a very long time, but there is an edge case that I don't know how to resolve:

So I am watching a components-folder for any files changing.
Relevant part:

gulp.watch(['components/**/*.scss'])
  .on("add", function(path, stats) {
    // do stuff
  })
...

This works great if I drag in a .scss file in to the components-folder.
It also works if I copy + paste a folder containing a .scss file in to the components-folder.
If also works if I drag and drop a .scss file from one subfolder from the components-folder, to another subfolder of the components-folder.

However it doesn't work when I drag a folder containing a .scss file in to the components-folder.

Mind you, by dragging it in to the components-folder, I am not symlinking anything, I am merely changing the position of the folder on my local system.

This being weird, I was thinking that maybe internally in OSX, the file doesn't actually move, only the folder containing it?

As an extra indication: (Not sure if this one is helpfull, or making it more confusing) If I have a file in components/component-a/style.scss, and I rename the folder from "component-a" to "component-b", nothing gets triggered. (add, change or unlink)

Please let me know if you need more information, or if you can point me in the right direction :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant