wails icon indicating copy to clipboard operation
wails copied to clipboard

Implementing directory and file Ignore for dev command

Open ironpark opened this issue 2 years ago • 5 comments

Description

#1031

When using the Dev command, you may not want to trigger a rebuild when a file or directory changes that are not related to the app

{
   "name": "app name",
...
+   "ignore": [
+      "*_test.go",
+      "*_generated.go",
+      "internal/cmd/test"
+   ],
...
}

In project, already using the github.com/sabhiram/go-gitignore package, so I use it, so the syntax is the same as that of gitignore.

Does have any other thoughts on that implementation, or a problem sword? @leaanthony

ironpark avatar May 18 '23 14:05 ironpark

@Ironpark - I'm happy to move ahead with this. Are you able to address the merge conflicts and add an entry to the changelog located at website/src/pages/changelog.mdx?

leaanthony avatar Jul 09 '23 22:07 leaanthony

@leaanthony Updated some missing code and the changelog :)

ironpark avatar Jul 27 '23 09:07 ironpark

Thanks for doing this 👍 Sorry, I realised I should have asked you to update a couple of other files too! 😅

  • https://github.com/wailsapp/wails/blob/master/website/static/schemas/config.v2.json has the project schema
  • https://github.com/wailsapp/wails/blob/master/website/docs/reference/project-config.mdx

I just updated the config.v2.json, project-config.mdx files.

"ignore": {
    "type": "array",
    "description": "Specifies a matching folder or file path that should not trigger a reload when changed. Each pattern follows gitignore's matching rules.",
    "examples": [
        ["*_test.go", "/cmd/cli/*.go"]
    ]
}

ironpark avatar Jul 31 '23 03:07 ironpark

Bah, I'm really sorry this has slipped so far. If you are keen to get this in, could you please resolve the conflict and we'll get this merged in

leaanthony avatar Oct 21 '23 10:10 leaanthony

@Ironpark - ping

leaanthony avatar Mar 24 '24 06:03 leaanthony