瀏覽代碼

amberc-grunt.js: make Node.js 0.8 compatible

replace:
path.exists -> fs.exists
path.existsSync -> fs.existsSync
Manfred Kroehnert 11 年之前
父節點
當前提交
f71585e6db
共有 2 個文件被更改,包括 225 次插入200 次删除
  1. 4 4
      server/FileServer.st
  2. 221 196
      server/server.js

+ 4 - 4
server/FileServer.st

@@ -48,11 +48,11 @@ initialize
 !
 
 checkDirectoryLayout
-	(path existsSync: self basePath, 'index.html') ifFalse: [
+	(fs existsSync: self basePath, 'index.html') ifFalse: [
 		console warn: 'Warning: project directory does not contain index.html'].
-	(path existsSync: self basePath, 'st') ifFalse: [
+	(fs existsSync: self basePath, 'st') ifFalse: [
 		console warn: 'Warning: project directory is missing an "st" directory'].
-	(path existsSync: self basePath, 'js') ifFalse: [
+	(fs existsSync: self basePath, 'js') ifFalse: [
 		console warn: 'Warning: project directory is missing a "js" directory'].
 ! !
 
@@ -111,7 +111,7 @@ handleGETRequest: aRequest respondTo: aResponse
 	| uri filename |
 	uri := (url parse: aRequest url) pathname.
 	filename := path join: self basePath with: uri.
-	path exists: filename do: [:aBoolean |
+	fs exists: filename do: [:aBoolean |
 		aBoolean
 			ifFalse: [self respondNotFoundTo: aResponse]
 			ifTrue: [self respondFileNamed: filename to: aResponse]]

文件差異過大導致無法顯示
+ 221 - 196
server/server.js


部分文件因文件數量過多而無法顯示