Forráskód Böngészése

amber/xxx: define call without explicit name

Explicit names should be omitted in good style AMD.

(amber packages use explicit names, by design,
other parts need not and should not)
Herbert Vojčík 10 éve
szülő
commit
1a1ae9921d
4 módosított fájl, 4 hozzáadás és 4 törlés
  1. 1 1
      internal/grunt-tasks/grunt-peg.js
  2. 1 1
      support/boot.js
  3. 1 1
      support/helpers.js
  4. 1 1
      support/parser.js

+ 1 - 1
internal/grunt-tasks/grunt-peg.js

@@ -18,7 +18,7 @@ module.exports = function(grunt) {
       export_var: 'module.exports'
     });
     var parser = PEG.buildParser(grunt.file.read(this.data.src), options);
-    var content = 'define("amber/parser", ["./boot"], function($boot) {\nvar $globals = $boot.globals, nil = $boot.nil;\n'+options.export_var + ' = ' + parser + ';\n});';
+    var content = 'define(["amber/boot"], function($boot) {\nvar $globals = $boot.globals, nil = $boot.nil;\n'+options.export_var + ' = ' + parser + ';\n});';
     grunt.file.write(this.data.dest, content);
   });
 };

+ 1 - 1
support/boot.js

@@ -39,7 +39,7 @@
 
 //jshint eqnull:true
 
-define("amber/boot", [ 'require', './browser-compatibility' ], function (require) {
+define([ 'require', './browser-compatibility' ], function (require) {
 
 	/* Reconfigurable micro composition system, https://github.com/amber-smalltalk/brikz */
 

+ 1 - 1
support/helpers.js

@@ -1,4 +1,4 @@
-define("amber/helpers", ["amber/boot", "require"], function (boot, require) {
+define(["amber/boot", "require"], function (boot, require) {
     var globals = boot.globals,
         exports = {},
         api = boot.api,

+ 1 - 1
support/parser.js

@@ -1,4 +1,4 @@
-define("amber/parser", ["./boot"], function($boot) {
+define(["amber/boot"], function($boot) {
 var $globals = $boot.globals, nil = $boot.nil;
 $globals.SmalltalkParser = (function() {
   /*