Browse Source

snake_case => camelCase

Herbert Vojčík 9 years ago
parent
commit
39ac0de3f9

+ 2 - 2
external/amber-cli/support/amberc-cli.js

@@ -45,10 +45,10 @@ function handle_options(optionsArray) {
                 defaults.jsGlobals.push.apply(defaults.jsGlobals, optionsArray.shift().split(','));
                 break;
             case '-n':
-                defaults.amd_namespace = optionsArray.shift();
+                defaults.amdNamespace = optionsArray.shift();
                 break;
             case '-D':
-                defaults.output_dir = optionsArray.shift();
+                defaults.outputDir = optionsArray.shift();
                 break;
             case '-d':
                 amber_dir = path.normalize(optionsArray.shift());

+ 6 - 6
external/amber-dev/lib/amberc.js

@@ -88,12 +88,12 @@ var createDefaultConfiguration = function () {
         'load': [],
         'stFiles': [],
         'jsGlobals': [],
-        'amd_namespace': 'amber_core',
+        'amdNamespace': 'amber_core',
         'libraries': [],
         'jsLibraryDirs': [],
         'compile': [],
         'compiled': [],
-        'output_dir': undefined,
+        'outputDir': undefined,
         'verbose': false
     };
 };
@@ -107,8 +107,8 @@ var createDefaultConfiguration = function () {
 AmberCompiler.prototype.main = function (configuration, finished_callback) {
     console.time('Compile Time');
 
-    if (configuration.amd_namespace.length === 0) {
-        configuration.amd_namespace = 'amber_core';
+    if (configuration.amdNamespace.length === 0) {
+        configuration.amdNamespace = 'amber_core';
     }
 
     if (configuration.jsLibraryDirs != null) {
@@ -438,7 +438,7 @@ function category_export(configuration) {
         configuration.compile.map(function (stFile) {
             return new Promise(function (resolve, reject) {
                 var category = path.basename(stFile, '.st');
-                var jsFilePath = configuration.output_dir;
+                var jsFilePath = configuration.outputDir;
                 if (jsFilePath == null) {
                     jsFilePath = path.dirname(stFile);
                 }
@@ -447,7 +447,7 @@ function category_export(configuration) {
                 configuration.compiled.push(jsFile);
                 var smalltalkGlobals = configuration.globals;
                 var packageObject = smalltalkGlobals.Package._named_(category);
-                packageObject._transport()._namespace_(configuration.amd_namespace);
+                packageObject._transport()._namespace_(configuration.amdNamespace);
                 fs.writeFile(jsFile, smalltalkGlobals.String._streamContents_(function (stream) {
                     smalltalkGlobals.AmdExporter._new()._exportPackage_on_(packageObject, stream);
                 }), function (err) {

+ 6 - 6
external/amber-dev/tasks/grunt-amberc.js

@@ -27,10 +27,10 @@ module.exports = function (grunt) {
            verbose: true
          },
          src: ['projects/HelloWorld/src/HelloWorld.st'], // REQUIRED
-         output_dir: 'projects/HelloWorld/src',  // optional
+         outputDir: 'projects/HelloWorld/src',  // optional
          libraries: 'Web',                       // optional
          jsGlobals: ['global1', 'global2'],     // optional
-         amd_namespace: 'MyNamespace',          // optional (default: 'amber')
+         amdNamespace: 'MyNamespace',          // optional (default: 'amber')
        },
      },
 
@@ -81,11 +81,11 @@ module.exports = function (grunt) {
         if (sourceFiles != null) {
             configuration.stFiles = sourceFiles;
         }
-        if (data.amd_namespace != null) {
-            configuration.amd_namespace = data.amd_namespace;
+        if (data.amdNamespace != null) {
+            configuration.amdNamespace = data.amdNamespace;
         }
-        if (data.output_dir != null) {
-            configuration.output_dir = data.output_dir;
+        if (data.outputDir != null) {
+            configuration.outputDir = data.outputDir;
         }
         if (data.jsGlobals != null) {
             configuration.jsGlobals.push.apply(configuration.jsGlobals, data.jsGlobals);