Code Monkey home page Code Monkey logo

coffee-maven-plugin's People

Contributors

danieldbower avatar dependabot[bot] avatar jlleitschuh avatar jonbca avatar pdunnavant avatar ryotaro612 avatar talios avatar treeno avatar wpraet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

coffee-maven-plugin's Issues

Improper Closing Version Tag in README.md

Small issue that's not really worth a fork and pull request.

In the READEME.md file line 10 (<version>1.1.3/version>) should be changed to <version>1.1.3</version>.

Cannot compile files individually.

I have tried setting the `' tag to compile individually, but it doesn't seem to make a difference in the output. The console does report messages like:

[INFO] Compiling File accounts.coffee in JoinSet:main
[INFO] Compiling File app_error.coffee in JoinSet:main

so I know the setting is being read correctly, but I still get just one output js file, main.js for the JoinSet shown above.

Here is my plugin config:

<plugin>
  <groupId>com.theoryinpractise</groupId>
  <artifactId>coffee-maven-plugin</artifactId>
  <version>1.4.7</version>

  <configuration>
    <version>1.6.1</version>
    <coffeeOutputDirectory>${basedir}/js</coffeeOutputDirectory>
    <compileIndividualFiles>true</compileIndividualFiles>
    <coffeeJoinSets>
      <joinSet>
        <id>main</id>
        <fileSet>
          <directory>${basedir}/coffee</directory>
          <includes>
            <include>**/*.coffee</include>
          </includes>
        </fileSet>
      </joinSet>
      <joinSet>
        <id>test</id>
        <coffeeOutputDirectory>${basedir}/test/specs/js</coffeeOutputDirectory>
        <fileSet>
          <directory>${basedir}/test/specs/coffee</directory>
          <includes>
            <include>**/*.coffee</include>
          </includes>
        </fileSet>
      </joinSet>
    </coffeeJoinSets>
  </configuration>

  <executions>
    <execution>
      <id>coffee</id>
      <goals>
        <goal>coffee</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Omitting <coffeeJoinSets> leads to NullPointerException

Hi!

Omitting the coffeeJoinSets leads to a NullPointerException. I know this is a usage error, but that should not lead to an hard NullPointer. A human readable error message would be better.
I consider this as especially important because this plugin is still new and you won't find much help and documentation on the net.

Greetings
treeno

Remove dependency on jcoffeescript-1.1.jar

Remove the current dependency on jcoffeescript-1.1.jar, re implement the running of coffee script inside the plugin and make it somehow possible to update the coffee compiler external to the plugin.

Delete old files after merge

Can we get an option to delete the old files after the unified and minified version has been created?

Thanks a lot.

No Support for CoffeeScript 1.6.3

When I try to transpile with the newer version 1.6.3 of CoffeeScript I receive the error:

[ERROR] Failed to execute goal com.theoryinpractise:coffee-maven-plugin:1.4.7:coffee (coffee) on project timer: Unsupported version of coffee-script specified (1.6.3) - supported versions: 1.2.0, 1.3.1, 1.3.3, 1.4.0, 1.5.0, 1.6.1 -> [Help 1]

Eclipse IDE support

When using this plugin in Eclipse with m2e, you get "Plugin execution not covered by lifecycle". This makes the plugin unusable in Eclipse; even if you add a custom lifecycle mapping, the plugin continually recompiles. Some small changes to the plugin will prevent this, allowing Eclipse devs to benefit from your work.

There is a good page here: http://wiki.eclipse.org/M2E_compatible_maven_plugins
which describes the steps necessary. Essentially:

  1. Add a small XML file
  2. Use BuildContext for file operations

You can see an example of the XML here: https://github.com/marceloverdijk/lesscss-maven-plugin/blob/master/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml

The page has some examples of using BuildContext, but here's a real example: https://github.com/marceloverdijk/lesscss-maven-plugin/blob/master/src/main/java/org/lesscss/mojo/CompileMojo.java

in-place replacement

Is there a way to configure the plugin to just in-place replace the coffeescript files in place? For example-

webapp
--->js
---->someSubFolder
------>someFile.coffee

would be built in the build directory as

webapp
--->js
---->someSubFolder
------>someFile.js

Suggestion: add multiple paths so that coffee script can live in web app too

It may make sense to allow more than one coffeeDir so that you can allow for both src/main/coffee and also coffee files in src/main/webapp. That way the scripts can either live alongside the web app files in their appropriate subdirectories (views of controllers, for example) or more like Java source code.

coffee compile output need keep the directory

I write some scripts in "src/main/coffee" and some scripts in "src/main/coffee/component". When use coffee-maven-plugin, all scripts are compiled to "target/coffee", directory "component" is not keeped.

So, coffee compile output need keep the directory "component"

eclipse incremental build support

I want eclipse build coffeescript auto & incremental. So I add following config:

<pluginExecution>
    <pluginExecutionFilter>
        <groupId>com.theoryinpractise</groupId>
        <artifactId>coffee-maven-plugin</artifactId>
        <versionRange>[1.4.7,)</versionRange>
        <goals>
            <goal>coffee</goal>
        </goals>
    </pluginExecutionFilter>
    <action>
        <execute>
            <runOnIncremental>true</runOnIncremental>
        </execute>
    </action>
</pluginExecution>

It works, but when I save a file, even not a .coffee file, then all coffee files are compiled again(It takes a long time. During the time, eclipse always show "Build workspace (xx%)").

So I want coffee-maven-plugin support incremental build. If a .coffee file is not changed and the compiled .js file exist, then skip the compile.

I am using lesscss-maven-plugin too, it works fine, then source code is here(https://github.com/marceloverdijk/lesscss-maven-plugin/blob/master/src/main/java/org/lesscss/mojo/CompileMojo.java).

Thanks very much.

support 'watch' mode

-w, --watch Watch the modification times of the coffee-scripts, recompiling as soon as a change occurs.

JoinSet and Minifiy file order?

This seems like an obvious question: since the order of files in a JS library is critical, am I missing a way to specify the order in which the plugin adds files to the join sets and/or minifiy process?

I'm defining a fileset, with the includes in the proper order. But the plugin just builds the final JS file in alphabetical order (by directory, then file). I've tried everything I can think of, including a separate fileset for every file, but nothing works. Is there really no way to specify the order of the included files?

Failed to execute goal com.theoryinpractise:coffee-maven-plugin:1.1.2:coffee (default-cli) on project frontend: null: MojoExecutionException

v1.1.1 works. but v1.1.2 fail.

  <plugin>
    <groupId>com.theoryinpractise</groupId>
    <artifactId>coffee-maven-plugin</artifactId>
    <executions>
      <execution>
        <goals>
          <goal>coffee</goal>
        </goals>
      </execution>
    </executions>
    <configuration>
      <coffeeDir>${basedir}/src/main/webapp</coffeeDir>
      <outputDirectory>${basedir}/src/main/webapp</outputDirectory>
    </configuration>
  </plugin>

[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building frontend 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- coffee-maven-plugin:1.1.2:coffee (default-cli) @ frontend ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.508s
[INFO] Finished at: Tue Aug 02 01:17:25 CST 2011
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.theoryinpractise:coffee-maven-plugin:1.1.2:coffee (default-cli) on project frontend: null: MojoExecutionException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.theoryinpractise:coffee-maven-plugin:1.1.2:coffee (default-cli) on project frontend: null
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException
at com.theoryinpractise.coffeescript.CoffeeScriptCompilerMojo.execute(CoffeeScriptCompilerMojo.java:95)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.