Ignore directory and all nested directories/files
Closed this issue · 18 comments
Adding a directory to the ignored
list does not make fresh
ignore all nested directories/files.
Yes, I found the same problem. Anyone can help to fix it?
I want to ignore node_modules directory, but not work.
ugh
@wubin1989 are you using a proper recompile.conf
file? I had the same issue, but it seems to be resolved after setting the proper root
and ignore
lines in recompile.conf
.
My recompile.conf
file for reference:
root: .
tmp_path: .tmp_build
build_name: my-app
build_log: my-app-build-errors.log
valid_ext: .go, .tmpl
ignored: assets, node_modules, containers
build_delay: 600
colors: 1
log_color_main: cyan
log_color_build: yellow
log_color_runner: green
log_color_watcher: magenta
I start the binary with the following command within a Docker container:
backend:
build: ./backend
container_name: backend
working_dir: /go/src/github.com/my-org/my-project
command: fresh -c /go/src/github.com/my-org/my-project/containers/backend/recompile.conf
env_file: ../../.env
volumes:
- ../../.:/go/src/github.com/my-org/my-project
ports:
- "8000:3001"
links:
- cache
It's not working for sub directories neither with configuration
So, the idea is that is ignoring that directory, but it watches all the sub directories
@cristian-sima can you paste your recompile.conf
?
Sure. I called it fresh.conf
root: .
tmp_path: tmp
build_name: cube
build_log: cube-build-errors.log
valid_ext: .go, .html
ignored: tmp, node_modules, util, static, source, conf, grunt
build_delay: 600
colors: 1
log_color_main: cyan
log_color_build: yellow
log_color_runner: green
log_color_watcher: magenta
Thanks for your quick reply. I was searching for an alternative to this project cause I can not do npm install
in the sense it blocks the node folders
@pilu or someone else can take a look at this?
It is really frustrating 😠
Someone?
Hi @cristian-sima , I'm sorry for the late reply. Unfortunately I can't work on this soon, but it might be a quick fix for anyone who wants to send me a PR.
There's a function called isIgnoredFolder
in utils.go
that checks that. It should be easy to change the == paths[0]
to just check if a folder is a subfolder of the ignored path. maybe @ernestas-poskus who worked on that can help us?
@pilu I solved this problem with the pull request
I'm still having this issue, this is my conf:
root: .
tmp_path: ./tmp
build_name: runner-build
build_log: runner-build-errors.log
valid_ext: .go
no_rebuild_ext: .tpl, .tmpl, .html
ignored: assets, tmp, public/assets, vendor, templates, node_modules
build_delay: 600
colors: 1
log_color_main: cyan
log_color_build: yellow
log_color_runner: green
log_color_watcher: magenta
log_color_app:
can comebody tell me how to fix it ?
I also can't ignore subdirectories with a '/' in the name (ie public/assets). I'll see if I can get this squared away
@gmccue should I open a new issue (since this is closed) as I'm experiencing what @cheddarwhizzy is, in my case I can ignore frontend, but not frontend/node_modules?
Can this get re-opened @markreg