-
Notifications
You must be signed in to change notification settings - Fork 218
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
Recommended way to ignore files in tree? #233
Comments
There's currently no way to do that. Can you share your use case? What specific problem are you having or trying to solve? |
for reference, in ember-cli we solved this by moving to our own watcher that does this filtering. https://github.com/krisselden/broccoli-sane-watcher |
@joliss: coming back to ember (and broccolijs) after a long time, this issue is still giving me trouble. My use case is simple: emacs generates backup files and other temporary files, for example files with suffix
The only way to get rid of the problem is to stop and restart I would say that a config parameter to ignore files according to a glob or a regexp would help here. |
I customized emacs to keep backups in system temp instead, and I disabled lockfiles entirely (a feature of dubious value if you're accustomed to running a singleton emacs daemon anyway): (setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
(setq create-lockfiles nil) But I agree that it would be nice to make broccoli handle these cases gracefully. I think there are two separate issues being discussed. One is that the lockfiles are deliberately-dangling symlinks (named like Two is that backup files (named like |
we should The lockfiles seem also an issue, but unrelated to this issue exactly? Although I suspect once, this issue is resolve the lockfiles will become the next issue. It seems like we would need to guard all symlink reading? Im nervous to add a check to validate all symlinks in walk-sync, i can't imagine that would be a performant change... I'm open to suggestions, |
@stefanpenner I can try this, but I would need some pointers. afaik I have no broccoli-sane-watcher installed. The only broccoli related stuff in my package.json is:
So I do not know how to:
You mention that
Am I using the right ember version? Do I need to configure something to activate |
The case we are struggling with is supporting a project structure that contains root-level files that are of interest. E.g:
Is there currently any way to have a filter apply to E.g.
Creates enormous slowdowns and causes the watcher to enter infinite watch loops triggered by Broccoli's own changes to the |
This is largely an OS limitation. e.g. FSEvents only understand recursive watching... For this use-case, i've wanted the ability to specify This shouldn't be very hard to add, but would require buy-in, and changes to the builder/watcher relationship. Maybe the high level API would be something like: let tree = new Funnel('.', {
files: ['index.html'],
watcher: { type: 'polling', interval: 1000 } // or maybe something more generic like "per file"
}) |
That would be nice! |
We do have these broccoli-source primitives. They currently support |
Any progress on this. I am new to ember/broccolli so I don't understand most of what you are saying(with regards to broccolli source and co) |
@noxecane here's a recent discussion on how to remove files from a broccoli tree. Please chime in there if it's relevant and you have more questions, or make a new topic and we can point you to the right resources. |
Thanks @ef4 it did work. |
To be clear, this is what I did const Funnel = require('broccoli-funnel');
const EmberApp = .....
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
trees: {
app: (new Funnel('app', {
exvlude: ['**/.#*.js', '**/.#*.hbs', '**/.#*.scss']
}))
}
}); |
As described here broccoli has problems with emacs temporary files (on-purpose broken symlinks). It was suggested to use a brocignore file, but that seems to be deprecated (#179).
What is the recommended method to globally ignore files in brocoli?
The text was updated successfully, but these errors were encountered: