-
Notifications
You must be signed in to change notification settings - Fork 11
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
Error Unexpected token while parsing mustache templates #3
Comments
It should work. I have a project with a similar use case but using
|
There is something wrong with the exclude globs. When I specify a path explicitly, it does not exclude the file. E.g. I have
While this does work as expected: |
@mantoni The thing with the exclude pattern is that browserify calls the transform me the absolute path to the file to be transformed. Therefore the exclude pattern is not relative (ie: @tjunghans Please send me the log file when it fails. BTW are you using the latest version of the plugin right? (v2.1.0) |
@ferlores I need to look at this issue in more detail. From what I can tell the problem arises with fixtures (.mustache, .json and I suppose any other file) that are included in a Here is the console error output. In this case a json file is causing the error, but it's the same for .mustache:
|
@tjunghans The error is not very descriptive. Anyway in the run that you just made you are excluding the
or
Anyway, would be nice to have a better error message. I'll see if I can improve it |
BTW, I just tried on one of my projects and I get this error if I dont specify a transform and I dont ignore the handlebars template:
|
@ferlores I can confirm your 2nd to last comment. I'm using the first example with two As for your last comment, I have the browserify transform in the package.json, so that shouldn't be an issue. On Windows I receive an error with the JSON file. The following command...
...causes the following error:
I actually ought to create minimal example to isolate the problem. I'll try and get around to that and let you know about my findings. |
@tjunghans did you do any progress here? I would accept a PR with the fix for windows. Thanks! |
@ferlores No, not yet. I will create a PR if I get around to it. |
I am having a hard time using the exclude globs as well. I do not get any errors, but doing the following:
will work and exclude When I run the same pattern against |
I use mochify a lot and this is a great add-on!
I found an error with required mustache templates in the javascript files being tested. The mustache templates are required as follows and are in the same directory as the javascript files:
The browserify-hogan transformer is applied on mustache templates. The transformer is specified in the
package.json
.I have tried excluding mustache templates using
--exclude '**/*.mustache'
which leads to another error as it seems (the console is spitting out a whole lot of JSON).The command I'm running is:
The text was updated successfully, but these errors were encountered: