|
@@ -38594,7 +38594,7 @@ fn: function (){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
var $1;
|
|
|
-$1=_st(self["@fs"])._existsSync_(self._normalizePath_("index.html"));
|
|
|
+$1=_st(self["@fs"])._existsSync_(self._withBasePath_("index.html"));
|
|
|
if(! smalltalk.assert($1)){
|
|
|
_st(console)._warn_("Warning: project directory does not contain index.html.");
|
|
|
$ctx1.sendIdx["warn:"]=1;
|
|
@@ -38604,8 +38604,8 @@ _st(console)._warn_(" You can also specify a custom error page with --fallbac
|
|
|
};
|
|
|
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.'].",
|
|
|
-messageSends: ["ifFalse:", "existsSync:", "normalizePath:", "warn:"],
|
|
|
+source: "checkDirectoryLayout\x0a\x09(fs existsSync:\x09(self withBasePath: '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:", "withBasePath:", "warn:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.FileServer);
|
|
@@ -38921,24 +38921,6 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.FileServer);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
-selector: "normalizePath:",
|
|
|
-category: 'private',
|
|
|
-fn: function (aBaseRelativePath){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
-var $1;
|
|
|
-$1=_st(self["@path"])._join_with_(self._basePath(),aBaseRelativePath);
|
|
|
-return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"normalizePath:",{aBaseRelativePath:aBaseRelativePath},smalltalk.FileServer)})},
|
|
|
-args: ["aBaseRelativePath"],
|
|
|
-source: "normalizePath: aBaseRelativePath\x0a\x09\x22return a nomalized path which is relative to the basePath.\x22\x0a\x09^\x09path join: self basePath with: aBaseRelativePath",
|
|
|
-messageSends: ["join:with:", "basePath"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.FileServer);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "password:",
|
|
@@ -39268,6 +39250,24 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.FileServer);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "withBasePath:",
|
|
|
+category: 'private',
|
|
|
+fn: function (aBaseRelativePath){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
+$1=_st(self["@path"])._join_with_(self._basePath(),aBaseRelativePath);
|
|
|
+return $1;
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"withBasePath:",{aBaseRelativePath:aBaseRelativePath},smalltalk.FileServer)})},
|
|
|
+args: ["aBaseRelativePath"],
|
|
|
+source: "withBasePath: aBaseRelativePath\x0a\x09\x22return a file path which is relative to the basePath.\x22\x0a\x09^\x09path join: self basePath with: aBaseRelativePath",
|
|
|
+messageSends: ["join:with:", "basePath"],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.FileServer);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "writeData:toFileNamed:",
|