Przeglądaj źródła

Removed warnings for missing js/ and st/ directories

Thomas Rake 11 lat temu
rodzic
commit
a1a5ed4991
3 zmienionych plików z 8 dodań i 48 usunięć
  1. 3 21
      cli/js/AmberCli.js
  2. 2 6
      cli/st/AmberCli.st
  3. 3 21
      cli/support/amber-cli.js

+ 3 - 21
cli/js/AmberCli.js

@@ -252,36 +252,18 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$5,$6,$4,$7;
-$2=self["@fs"];
-$3=self._normalizePath_("index.html");
-$ctx1.sendIdx["normalizePath:"]=1;
-$1=_st($2)._existsSync_($3);
-$ctx1.sendIdx["existsSync:"]=1;
+var $1;
+$1=_st(self["@fs"])._existsSync_(self._normalizePath_("index.html"));
 if(! smalltalk.assert($1)){
 _st(console)._warn_("Warning: project directory does not contain index.html.");
 $ctx1.sendIdx["warn:"]=1;
 _st(console)._warn_("    You can specify the directory containing index.html with --base-path.");
 $ctx1.sendIdx["warn:"]=2;
-};
 _st(console)._warn_("    You can also specify a custom error page with --fallback-page.");
-$ctx1.sendIdx["warn:"]=3;
-$5=self["@fs"];
-$6=self._normalizePath_("st");
-$ctx1.sendIdx["normalizePath:"]=2;
-$4=_st($5)._existsSync_($6);
-$ctx1.sendIdx["existsSync:"]=2;
-if(! smalltalk.assert($4)){
-_st(console)._warn_("Warning: project directory is missing an \x22st\x22 directory");
-$ctx1.sendIdx["warn:"]=4;
-};
-$7=_st(self["@fs"])._existsSync_(self._normalizePath_("js"));
-if(! smalltalk.assert($7)){
-_st(console)._warn_("Warning: project directory is missing a \x22js\x22 directory");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"checkDirectoryLayout",{},smalltalk.FileServer)})},
 args: [],
-source: "checkDirectoryLayout\x0a\x09(fs existsSync:\x09(self normalizePath: 'index.html')) ifFalse: [\x0a\x09\x09console warn: 'Warning: project directory does not contain index.html.'.\x0a\x09\x09console warn: '    You can specify the directory containing index.html with --base-path.'.].\x0a\x09\x09console warn: '    You can also specify a custom error page with --fallback-page.'.\x0a\x09(fs existsSync:\x09(self normalizePath:  'st')) ifFalse: [\x0a\x09\x09console warn: 'Warning: project directory is missing an \x22st\x22 directory'].\x0a\x09(fs existsSync:\x09(self normalizePath: 'js')) ifFalse: [\x0a\x09\x09console warn: 'Warning: project directory is missing a \x22js\x22 directory'].",
+source: "checkDirectoryLayout\x0a\x09(fs existsSync:\x09(self normalizePath: 'index.html')) ifFalse: [\x0a\x09\x09console warn: 'Warning: project directory does not contain index.html.'.\x0a\x09\x09console warn: '    You can specify the directory containing index.html with --base-path.'.\x0a\x09\x09console warn: '    You can also specify a custom error page with --fallback-page.'].",
 messageSends: ["ifFalse:", "existsSync:", "normalizePath:", "warn:"],
 referencedClasses: []
 }),

+ 2 - 6
cli/st/AmberCli.st

@@ -170,12 +170,8 @@ username: aUsername
 checkDirectoryLayout
 	(fs existsSync:	(self normalizePath: 'index.html')) ifFalse: [
 		console warn: 'Warning: project directory does not contain index.html.'.
-		console warn: '    You can specify the directory containing index.html with --base-path.'.].
-		console warn: '    You can also specify a custom error page with --fallback-page.'.
-	(fs existsSync:	(self normalizePath:  'st')) ifFalse: [
-		console warn: 'Warning: project directory is missing an "st" directory'].
-	(fs existsSync:	(self normalizePath: 'js')) ifFalse: [
-		console warn: 'Warning: project directory is missing a "js" directory'].
+		console warn: '    You can specify the directory containing index.html with --base-path.'.
+		console warn: '    You can also specify a custom error page with --fallback-page.'].
 !
 
 initialize

+ 3 - 21
cli/support/amber-cli.js

@@ -38593,36 +38593,18 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$5,$6,$4,$7;
-$2=self["@fs"];
-$3=self._normalizePath_("index.html");
-$ctx1.sendIdx["normalizePath:"]=1;
-$1=_st($2)._existsSync_($3);
-$ctx1.sendIdx["existsSync:"]=1;
+var $1;
+$1=_st(self["@fs"])._existsSync_(self._normalizePath_("index.html"));
 if(! smalltalk.assert($1)){
 _st(console)._warn_("Warning: project directory does not contain index.html.");
 $ctx1.sendIdx["warn:"]=1;
 _st(console)._warn_("    You can specify the directory containing index.html with --base-path.");
 $ctx1.sendIdx["warn:"]=2;
-};
 _st(console)._warn_("    You can also specify a custom error page with --fallback-page.");
-$ctx1.sendIdx["warn:"]=3;
-$5=self["@fs"];
-$6=self._normalizePath_("st");
-$ctx1.sendIdx["normalizePath:"]=2;
-$4=_st($5)._existsSync_($6);
-$ctx1.sendIdx["existsSync:"]=2;
-if(! smalltalk.assert($4)){
-_st(console)._warn_("Warning: project directory is missing an \x22st\x22 directory");
-$ctx1.sendIdx["warn:"]=4;
-};
-$7=_st(self["@fs"])._existsSync_(self._normalizePath_("js"));
-if(! smalltalk.assert($7)){
-_st(console)._warn_("Warning: project directory is missing a \x22js\x22 directory");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"checkDirectoryLayout",{},smalltalk.FileServer)})},
 args: [],
-source: "checkDirectoryLayout\x0a\x09(fs existsSync:\x09(self normalizePath: 'index.html')) ifFalse: [\x0a\x09\x09console warn: 'Warning: project directory does not contain index.html.'.\x0a\x09\x09console warn: '    You can specify the directory containing index.html with --base-path.'.].\x0a\x09\x09console warn: '    You can also specify a custom error page with --fallback-page.'.\x0a\x09(fs existsSync:\x09(self normalizePath:  'st')) ifFalse: [\x0a\x09\x09console warn: 'Warning: project directory is missing an \x22st\x22 directory'].\x0a\x09(fs existsSync:\x09(self normalizePath: 'js')) ifFalse: [\x0a\x09\x09console warn: 'Warning: project directory is missing a \x22js\x22 directory'].",
+source: "checkDirectoryLayout\x0a\x09(fs existsSync:\x09(self normalizePath: 'index.html')) ifFalse: [\x0a\x09\x09console warn: 'Warning: project directory does not contain index.html.'.\x0a\x09\x09console warn: '    You can specify the directory containing index.html with --base-path.'.\x0a\x09\x09console warn: '    You can also specify a custom error page with --fallback-page.'].",
 messageSends: ["ifFalse:", "existsSync:", "normalizePath:", "warn:"],
 referencedClasses: []
 }),