ソースを参照

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 11 年 前
コミット
1a1ae9921d
4 ファイル変更4 行追加4 行削除
  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'
       export_var: 'module.exports'
     });
     });
     var parser = PEG.buildParser(grunt.file.read(this.data.src), options);
     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);
     grunt.file.write(this.data.dest, content);
   });
   });
 };
 };

+ 1 - 1
support/boot.js

@@ -39,7 +39,7 @@
 
 
 //jshint eqnull:true
 //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 */
 	/* 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,
     var globals = boot.globals,
         exports = {},
         exports = {},
         api = boot.api,
         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;
 var $globals = $boot.globals, nil = $boot.nil;
 $globals.SmalltalkParser = (function() {
 $globals.SmalltalkParser = (function() {
   /*
   /*