소스 검색

grunt: add amd_namespace option

Manfred Kroehnert 11 년 전
부모
커밋
c04abeb2b9
1개의 변경된 파일10개의 추가작업 그리고 5개의 파일을 삭제
  1. 10 5
      grunt/tasks/grunt-amberc.js

+ 10 - 5
grunt/tasks/grunt-amberc.js

@@ -18,11 +18,12 @@ module.exports = function(grunt) {
          libraries: 'Canvas',                   // optional
          jsGlobals: ['global1', 'global2'],     // optional
          main_class: 'HelloWorld',              // optional
-         output_name: 'helloWorld',            // optional
-         main_file: 'myMain.js',               // optional
-         deploy: true,                         // optional
-         output_suffix: 'mySuffix',            // optional
-         library_suffix: '-0.9'                // optional
+         output_name: 'helloWorld',             // optional
+         amd_namespace: 'MyPackage',            // optional (default: 'amber')
+         main_file: 'myMain.js',                // optional
+         deploy: true,                          // optional
+         output_suffix: 'mySuffix',             // optional
+         library_suffix: '-0.9'                 // optional
        },
      },
 
@@ -104,6 +105,10 @@ module.exports = function(grunt) {
     if (undefined !== outputName) {
       configuration.program = outputName;
     }
+    var amdNamespace = data.amd_namespace;
+    if (undefined !== amdNamespace) {
+      configuration.amd_namespace = amdNamespace;
+    }
     if (undefined !== data.output_dir) {
       configuration.output_dir = data.output_dir;
     }