|
@@ -15,11 +15,15 @@ module.exports = function(grunt) {
|
|
|
|
|
|
amberc: {
|
|
amberc: {
|
|
options: {
|
|
options: {
|
|
- amber_dir: process.cwd(), // REQUIRED
|
|
|
|
- verbose: true // optional
|
|
|
|
|
|
+ amber_dir: process.cwd(), // REQUIRED
|
|
|
|
+ library_dirs: ['dir1', '/usr/local/js'], // optional
|
|
|
|
+ verbose: true // optional
|
|
},
|
|
},
|
|
helloWorld: {
|
|
helloWorld: {
|
|
- options: { // the 'options' object is optional
|
|
|
|
|
|
+ // this 'options' object is optional as well as all parameters inside it
|
|
|
|
+ // they can be used to override the global 'options'
|
|
|
|
+ options: {
|
|
|
|
+ library_dirs: ['dir1', '/usr/local/js'], // optional
|
|
verbose: true
|
|
verbose: true
|
|
},
|
|
},
|
|
src: ['projects/HelloWorld/st/HelloWorld.st'], // REQUIRED
|
|
src: ['projects/HelloWorld/st/HelloWorld.st'], // REQUIRED
|
|
@@ -42,9 +46,11 @@ module.exports = function(grunt) {
|
|
|
|
|
|
var options = this.options({
|
|
var options = this.options({
|
|
amber_dir: undefined,
|
|
amber_dir: undefined,
|
|
|
|
+ library_dirs: [],
|
|
verbose: grunt.option('verbose') || false
|
|
verbose: grunt.option('verbose') || false
|
|
});
|
|
});
|
|
this.data.verbose = options.verbose;
|
|
this.data.verbose = options.verbose;
|
|
|
|
+ this.data.library_dirs = options.library_dirs;
|
|
|
|
|
|
// mark required properties
|
|
// mark required properties
|
|
this.requiresConfig('amberc.options.amber_dir');
|
|
this.requiresConfig('amberc.options.amber_dir');
|
|
@@ -76,6 +82,10 @@ module.exports = function(grunt) {
|
|
if (undefined !== libraries) {
|
|
if (undefined !== libraries) {
|
|
configuration.load = libraries;
|
|
configuration.load = libraries;
|
|
}
|
|
}
|
|
|
|
+ var library_dirs = data.library_dirs;
|
|
|
|
+ if (undefined !== library_dirs) {
|
|
|
|
+ configuration.jsLibraryDirs = library_dirs;
|
|
|
|
+ }
|
|
var mainClass = data.main_class;
|
|
var mainClass = data.main_class;
|
|
if (undefined !== mainClass) {
|
|
if (undefined !== mainClass) {
|
|
configuration.main = mainClass;
|
|
configuration.main = mainClass;
|