Browse Source

amberc: remove obsolete 'amber_dir' parameter from createDefaults()

Manfred Kroehnert 10 years ago
parent
commit
ec058fee74
3 changed files with 7 additions and 7 deletions
  1. 3 3
      bin/amberc
  2. 1 1
      bin/amberc.js
  3. 3 3
      grunt/tasks/grunt-amberc.js

+ 3 - 3
bin/amberc

@@ -20,7 +20,7 @@ var amber_dir = path.normalize(path.join(path.dirname(process.argv[1]), '..'));
 
 var compiler = new amberc.Compiler(amber_dir);
 
-var configuration = handle_options(parameters, amber_dir);
+var configuration = handle_options(parameters);
 
 compiler.main(configuration);
 
@@ -29,10 +29,10 @@ compiler.main(configuration);
  * Process given program options and update defaults values.
  * Followed by check_for_closure_compiler() and then collect_files().
  */
-function handle_options(optionsArray, amber_dir) {
+function handle_options(optionsArray) {
 	var programName = [];
 	var currentItem = optionsArray.shift();
-	var defaults = amberc.createDefaults(amber_dir);
+	var defaults = amberc.createDefaults();
 
 	while(undefined !== currentItem) {
 		switch(currentItem) {

+ 1 - 1
bin/amberc.js

@@ -144,7 +144,7 @@ function AmberC(amber_dir) {
 /**
  * Default values.
  */
-var createDefaults = function(amber_dir, finished_callback){
+var createDefaults = function(finished_callback){
 	return {
 		'load': [],
 		'main': undefined,

+ 3 - 3
grunt/tasks/grunt-amberc.js

@@ -63,7 +63,7 @@ module.exports = function(grunt) {
     var compiler = new amberc.Compiler(grunt.config('amberc.options.amber_dir'));
 
     // generate the amberc configuration out of the given target properties
-    var configuration = generateCompilerConfiguration(this.data, this.filesSrc, grunt.config('amberc.options.amber_dir'));
+    var configuration = generateCompilerConfiguration(this.data, this.filesSrc);
 
     // run the compiler and call the async callback once finished
     var self = this;
@@ -74,8 +74,8 @@ module.exports = function(grunt) {
   });
 
 
-  function generateCompilerConfiguration(data, sourceFiles, amber_dir) {
-    var configuration = amberc.createDefaults(amber_dir);
+  function generateCompilerConfiguration(data, sourceFiles) {
+    var configuration = amberc.createDefaults();
     var parameters = [];
 
     var libraries = data.libraries;