-
Notifications
You must be signed in to change notification settings - Fork 1
Quick Start
For the impatient.
<dependencies>
...
<dependency>
<groupId>foodev</groupId>
<artifactId>fnug</artifactId>
<version>0.24</version>
</dependency>
...
</dependencies>
<repositories>
...
<repository>
<id>algesten</id>
<url>http://algesten.github.com/maven2</url>
</repository>
...
</repositories>
Download it from here: http://algesten.github.com/maven2/releases/foodev/fnug/
Config files and resources MUST be on the classpath
File layout src/main/resources/bundles.js <-- config file src/main/resources/js/ src/main/resources/js/mypackage/ src/main/resources/js/mypackage/sourcefile.js src/main/resources/js/mypackage/sourcefile.css ... src/main/webapp/WEB-INF/web.xml <-- servlet pointing to config src/main/webapp/index.html <-- loads js/css bundle
bundles.js { mypackage: { basePath: '/js/' <-- base path of mypackage from classpath root. files: [ 'mypackage/sourcefile.js' <-- array of "entry" files for dependency resolution. ], // Optional JsLint string. // jsLint: '/*jslint white: true, browser: true, onevar: false, undef: true, nomen: true, eqeqeq: true, plusplus: false, bitwise: true, regexp: true, newcap: true, immed: true, maxerr: 100, maxlen: 100 */', // Optional check modified interval (ms). Defaults to 3000. // checkModified: 3000 } }
web.xml fnug fnug.ResourceServlet 1 config /bundles.js <-- points to config file from classpath root. fnug /rs/*
index.html
<script type="text/javascript" src="/rs/mypackage.js"></script> <-- loads all bundle dependencies (and css).