-
Notifications
You must be signed in to change notification settings - Fork 0
Latest commit
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Intro ====================================
jscompiler-sbt is a very simple sbt 0.11.X plugin for web developers using coffeescript, dust and less.
It simply watchs the "web/**" folders in your src tree, compiles all .coffee, .dust or .less files and write them in the target folders (keeping the same tree structure).
I decided to develop my own first sbt plugin (yes this is also a self-learning project ;) ) to have an up to date web dev tool with a simple design allowing quick upgade/upgrade of the script compilers.
So right know it supports coffeescript 1.2.0, less 1.1.5 and dust 0.3.0.
Quick tutorial ===========================
You need sbt (0.11+, I did not test it against 10 maybe it might work?)
First you have to clone and publish-local this project to be able to use it (it is a little bit too early to publish it in a public repo).
> git clone git://github.com/aagahi/jscompiler-sbt.git
> xsbt publish-local
Then in your project:
- add in "./build.sbt" file:
seq(ws.nexus.jscompiler.JSCompilerPlugin.jsCompilerSettings: _*)
- add in "./project/plugins.sbt" file:
addSbtPlugin("ws.nexus" % "jscompiler-sbt" % "0.0.1-SNAPSHOT")
Activate the compiler with the watcher:
> xsbt
> ~ compile
Now you can edit .coffee, .less, or .dust files in the folder
./src/main/web/
or any subdirs, the tree structure is kept when compiling.
(yeah I know it should be configurable, in fact is quiet easy to change the source folder from the source and republish this plugin, but don't ask me right now how to deal with sbt magic using setting right now...)
It will automatically be compiled to your target dir in corresponding folder, for example:
./target/scala-2.9.1/resource_managed/main/
(if you're compiling for scala 2.9.1 platform)
---
Have fun and feel free to fork ;)
About
Scala SBT plugin: dust, less and coffeescript compiler
Resources
Stars
1 star
Watchers
1 watching