-
Notifications
You must be signed in to change notification settings - Fork 80
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
n00b question about watch #265
Comments
Hi @malcolmalex, you'll need to update the If you want to narrow it down you can traverse the individual keys, like: The section you'll need to modify is $ lineman config watch.coffee
{
"files": "<%= files.coffee.app %>",
"tasks": [
"coffee",
"concat_sourcemap:js"
]
} You can see there's an internal reference there to $ lineman config files.coffee
{
"app": "app/js/**/*.coffee",
"spec": "spec/**/*.coffee",
"specHelpers": "spec/helpers/**/*.coffee",
"generated": "generated/js/app.coffee.js",
"generatedSpec": "generated/js/spec.coffee.js",
"generatedSpecHelpers": "generated/js/spec-helpers.coffee.js"
} The |
Thanks @davemo - I've been using
and
With my watch set up like ...
and
But ... the 'app/*_/__test.spec' files are not getting picked up in the watch. Is it possible that the full watch list is put together by concatenating all the watch arrays, then the "!..." stuff is removed - rather than taking each array, processing the "!..." on them individually, and then assembling the results? |
So with {
coffee: {
"spec" : "app/**/*_test.coffee"
}
} This will setup the |
Hmm, I re-read what you posted and see you do have |
One other tip @malcolmalex, you can expand the interpolated strings using |
And yet another option, is to be able to see the actual file paths matched by globs is to use the |
That is a helpful option. Running each of these with this option gives me what I would expect:
and
I wonder if it's related, but I just realized I'm getting some tasks executing twice - watch executes and then I get concat_sourcemap ... I will try and create a smaller project to duplicate and file separately if it's not a known issue. |
Gotcha - ok, I'll try the |
FYI, I realized there's an additional feature to |
I think my initial suspicion was on track - lineman's watch is using grunt-watch-nospawn, which is using gaze, which is using fileset. In gaze the various arrays of file patterns get unioned. It is scanned to build an "include" and an "exclude" array, and then fileset is used to create a final array and all instances of "exclude" files are removed... which is why my In gaze.js:
and in fileset the files are processed one-by-one and excludes are thrown out ... fileset.js Makes it difficult to co-locate the files like this! |
I think my solution for this in the angular context is going to be to search for specific patterns in files.app ... "app/*/{Controller,Directive,Service,Whatever}.html. I'm going to close out this issue. Thanks |
I'm very new with lineman, but finding it great. A question, though ... I am trying to convert to a directory structure where the unit tests (*_test.coffee) are right alongside the code to be tested more along the lines of the google angular project structure recommendation, using the following kind of structure in my
files.coffee
file:But watch is not including the *_test.coffee files, even though my watch says says ...
It's like the files for watch get all put together, then the "app/*_/__test.coffee" gets removed from the list. Am I missing something or is there a better way to accomplish this? Thanks.
The text was updated successfully, but these errors were encountered: