implicit.ly

Scala software, hot off the presses

coffeescripted-sbt 0.2.2

If you've got n coffeescript source files, don't evaluate the coffeescript compiler n times, do it once per sbt session.

  • Consider icing your coffee #11.

Is your plain vanilla coffeescript just not cutting it anymore. Try iced coffee with support for better asyncronous primitives await and defer. I recommend checking out the comparisons to vanilla coffeescript in terms of how they react to change in requirements. The arguments are pretty convincing. Enable this but changing the CoffeeKeys iced setting to true.

(CoffeeKeys.iced in (Compile, CoffeeKeys.coffee)) := true

Note, iced coffeescript is a superset of coffeescript, meaning all of your coffeescript will work without change under the iced compiler. In iced mode, all .coffee and .iced files will get compiled using the iced compiler. You can revert back to standard coffeescript by leaving the iced setting as false. Only .coffee files will be compiled under the default coffee compiler, leaving you free to mix ice with your coffee safely.

coffeescripted-sbt compiles your CoffeeScripts so you don't have to.

via herald

Filed under  //   coffeescripted-sbt  

coffeescripted-sbt 0.2.1

  • upgraded from v1.1.1 to Coffeescript js compiler v1.2.0* changelog
  • published for sbt 0.11.2, ask nicely, if you need support older versions of sbt
  • the http://repo.lessis.me resolver is no longer needed for this plugin. This and all future artifacts will be published to scala tools.
  • for future reference, If you happen to plan on using the 1.2.0 CoffeeScript compiler and you just so happen to use a Javascript interpreter that understands, reserved words like static, follow the fix mentioned here here or here and save yourself an afternoon.

coffeescripted-sbt compiles your CoffeeScripts so you don't have to.

Filed under  //   Scala 2.9.1   coffeescripted-sbt   me.lessis  

coffeescripted-sbt 0.2.0

 Best Practices compliant.

  • no more coffee:

Away went the Coffee config and in comes the coffee scoped tasks

Below is a diagram to help you transition over to the new style of accessing keys

Before                 After
coffee                 -> coffee
coffee:clean           -> some-config:clean(for coffee)            or (clean in (SomeConfig, coffee))
coffee:sources         -> unmanaged-sources(for coffee)            or (unmanagedSources in (SomeConfig,coffee))
coffee:sourceDirectory -> some-config:source-directory(for coffee) or (sourceDirectory in (SomeConfig, coffee))
coffee:filter          -> filter(for coffee)                       or (filter in (SomeConfig, coffee))
coffee:excludeFilter   -> exclude-filter(for coffee)               or (excludeFilter in (SomeConfig, coffee))
coffee:targetDirectory -> some-config:resource-managed(for coffee) or (resourceManaged in (SomeConfig, coffee))
coffee:bare            -> bare(for coffee)                         or (bare in (SomeConfig, coffee))
coffee:charset         -> charset(for coffee)                      or (charset in (SomeConfig, coffee))

This new style should promote better reuse of built-in keys and more flexibility in terms of Configureabilty.

To include coffeescripted's settings within your build's default configs, use

seq(coffeeSettings:_*)

To include coffeescripted's setting with your build in a target config, use

seq(coffeeSettingsIn(TargetConfig):_*)
  • Keys have their own module, CoffeeKeys.

To override a coffeescripted key, access them through the CoffeeKeys module

(CoffeeKeys.bare in (Compile, CoffeeKeys.coffee)) := true
  • Sbt's compile task will depend on coffee, when mixing coffeeSettings

This enables CoffeeScript sources to both trigger be triggered by the common usage of ~compile.

  • Support for sbt 0.11.1

A little late to the party, but hey, we're here now.

See the project's README for more notes.

coffeescripted-sbt compiles your CoffeeScripts so you don't have to.

Filed under  //   Scala 2.9.1   coffeescripted-sbt   me.lessis  

coffeescripted-sbt 0.1.5

Fix for #4, broken character encoding support. Added new coffee:charset setting which sets the character encoding scheme used to generate files. The default is utf-8. If you should find the need to use another, you can always override it with

charset in Coffee := java.nio.charset.Charset.forName("ISO-8859-9")

coffeescripted-sbt compiles your CoffeeScripts so you don't have to.

Filed under  //   Scala 2.8.1   coffeescripted-sbt   me.lessis  

coffeescripted-sbt 0.1.4

  • Do filtering of sources more idiomatically using a coffee:filter FileFilter setting
  • Add CoffeeScript sources to sbt's watchSources for continuous triggered compilation support (~ coffee)

coffeescripted-sbt compiles your CoffeeScripts so you don't have to.

Filed under  //   Scala 2.8.1   coffeescripted-sbt   me.lessis  

coffeescripted-sbt 0.1.3

  • resolved gh1 with an alternative coffeescript compiler provided by daggerrz
  • renamed coffee-bare setting to bare

coffeescripted-sbt compiles your CoffeeScripts so you don't have to.

Filed under  //   Scala 2.8.1   coffeescripted-sbt   me.lessis  

coffeescripted-sbt 0.1.2

  • coffee always returns generated files n8han
  • new wave sbt versioning. sbt version will now be appended to the library version

    version <<= sbtVersion("0.1.2-%s" format _)

  • uses a proper config, Coffee.

All keys are defined under the coffee namespace. The primary coffee task is available in the global scope.

  • coffee:coffee-target now defaults to path target/{scalaVersion}/resource_managed/main/js

To go back the previous mapping, use

seq(coffeescript.CoffeeScript.coffeeSettings: _*)
targetDirectory in Coffee <<= (resourceManaged in Compile) { _ / "www" / "js" }
  • uses simpler key names based on sbt conventions

    coffee-clean  - coffee:clean
    coffee-source - coffee:source-directory
    coffee-target - coffee:target-directory
    coffee        - coffee or coffee:coffee
  • introduced a coffee:sources key that returns all CoffeeScript sources
  • no more auto-include settings magic. You now have to explicitly append settings. In your build.sbt file add the following line

    seq(coffeescript.CoffeeScript.coffeeSettings : _*)

  • small refactorings

coffeescripted-sbt compiles your CoffeeScripts so you don't have to.

Filed under  //   Scala 2.8.1   coffeescripted-sbt   me.lessis  

coffeescripted-sbt 0.1.1

CoffeeScript source compilation for sbt 0.10.0 and beyond

  • fixed issues with nested CoffeeScript source directories
  • actual error handling
  • prefer a managed resource output path
  • made better use of sbt 0.10.0 idioms
  • don't share reference to CoffeeScript compiler

Basic use

Add coffeescripted-sbt to your plugin chain

cat foo/project/plugins/build.sbt

resolvers += "less is" at "http://repo.lessis.me"

libraryDependencies += "me.lessis" %% "coffeescripted-sbt" % "0.1.1"

This will put the tasks coffee and coffee-clean in scope.

The plugin can be customized by changing the settings coffee-source, coffee-target and coffee-bare.

Thanks

Based on the original gist by zentroupe

coffeescripted-sbt compiles your CoffeeScripts so you don't have to.

Filed under  //   Scala 2.8.1   coffeescripted-sbt   me.lessis