Skip to content
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

conflict between jasmine-maven-plugin and CoffeeScript plugin for RequireJS #87

Closed
wants to merge 2 commits into from

Conversation

KengoTODA
Copy link

Hi, thank you for your cool plugin!
I'm trying to use jasmine-maven-plugin with CoffeeScript and RequireJS. Now I have a trouble and a suggestion to solve it.

problem

I use CoffeeScript to code. Example:

// main.js
require(['cs!original.module'], function(m){
  // ...
});
# original.module.coffee
define [], () ->
  # ...

But ProcessResourcesMojo translated original.module.coffee to javascript, so RequireJS's CoffeeScript plugin cannot load it correctly. Error messages like reserved word "function" on line 1 will be displayed.

solution

Avoid translation for src if requirejs is used. We don't have to change ProcessTestResourcesMojo because requirejs doesn't load test resources.

Please tell me your solution, or let's discuss about mine. I want to know who uses jasmine-maven-plugin with RequireJS and CoffeeScript, and their solution. Thank you!

@klieber
Copy link
Collaborator

klieber commented Mar 15, 2013

I'm thinking to fix this we should just add a parameter to the plugin configuration for disabling compilation of coffee script. I could see this as useful for other cases than just require.js, plus I'm trying to avoid cases where the plugin behaves differently for require.js vs the default.

@klieber klieber closed this in #215 Jan 1, 2014
klieber added a commit that referenced this pull request Jan 1, 2014
Create a new plugin property to control the Coffee Script compilation. closes #87 #214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants