-
Notifications
You must be signed in to change notification settings - Fork 1
Allows you to batch create JSPs or HTMLs ala Staticmatic style
License
pugnusferreus/batchjhaml
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
BatchJHaml allows you to create JSP or XHTML files in one go. Prerequisites : 1.) Apache Commons IO 2.) Apache Commons Lang 3.) Guava 4.) JHaml 5.) MarkdownJ 6.) JUnit Usage : 1.) install ant 2.) create a "lib" folder and put all jars mentioned above in there. 3.) run "ant build" to compile the source and create a jar file. 4.) create an "output" folder. This is where your jsps will be generated. 5.) create a "haml" folder and a "layouts" folder inside the "haml" folder. This is where your haml files will sit. 6.) modify the build.properties accordingly. 6.) run "ant run" to convert your Haml files to jsp. 7.) run "ant createJavaDoc" to generate java docs. 8.) run "ant test" to run unit test Note : - To use a custom layout for your Haml view, set the `@layout` variable at the beginning of the file: `- @layout = 'foo'` - To use the javascript helper, add `= javascripts 'foo'` in the %head - If you need custom javascripts for each page, add `= javascripts` in your layout's %head and for each page, add `- @javascripts 'foo','bar'` Ant build.xml integration : Add the following in your build.xml. Of course, you need to modify the xml accordingly. <target name="compile-haml"> <echo message="Converting haml files into jsp ..." /> <java fork="true" classname="com.progriff.jhaml.BatchJHaml"> <classpath> <fileset dir="${library.home}"> <include name="**/commons-io-*.jar" /> <include name="**/commons-lang-*.jar" /> <include name="**/guava-*.jar" /> <include name="**/jhaml-*.jar" /> <include name="**/markdownj-*.jar" /> </fileset> <path location="${library.home}/BatchJHaml.jar"/> </classpath> <arg value="~/BatchJHaml/haml"/> <arg value="~/BatchJHaml/haml/layouts"/> <arg value="~/BatchJHaml/pages"/> <arg value="jsp"/> <arg value="~/BatchJHaml/javascripts"/> <arg value="~/BatchJHaml/stylesheets"/> <arg value="true"/> <!-- sets build recursively or not --> </java> </target> Copyright (c) 2011 Benson Lim. See LICENSE for details.
About
Allows you to batch create JSPs or HTMLs ala Staticmatic style
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published