瀏覽代碼

Nodejs examples WIP

Thomas Rake 11 年之前
父節點
當前提交
a52a00d32d
共有 3 個文件被更改,包括 15 次插入16 次删除
  1. 8 1
      nodejs/Gruntfile.js
  2. 0 8
      nodejs/hello/Makefile
  3. 7 7
      nodejs/hello/README

+ 8 - 1
nodejs/Gruntfile.js

@@ -19,12 +19,19 @@ module.exports = function(grunt) {
 			main_class: 'Hello',
 			output_name: 'Program'
 		 },
-		 benchfib: {
+		benchfib: {
 			working_dir: 'benchfib',
 			src: ['Benchfib.st'],
 			main_class: 'Benchfib',
 			output_name: 'Program'
 		},
+		meta: {
+			working_dir: 'meta',
+			src: ['MyScript.st'],
+			main_class: 'MyScript',
+			libraries: ['parser','Compiler'],
+			output_name: 'Program'
+		},
 		pystone: {
 			working_dir: 'pystone',
 			src: ['Pystone.st'],

+ 0 - 8
nodejs/hello/Makefile

@@ -1,8 +0,0 @@
-Program.js: Hello.st
-	../../../bin/amberc -m Hello Hello.st Program
-
-run: Program.js
-	./hello
-
-clean:
-	rm -f Program.js Hello.js

+ 7 - 7
nodejs/hello/README

@@ -1,13 +1,13 @@
-Trivial Node.js example in JTalk that also uses the Google Closure compiler
-if ~/compiler.jar is present.
+Trivial Node.js example in Amber. To compile execute:
+	grunt amberc:hello
 
 Hello.st - source code.
 hello    - trivial bash script to run resulting program.
-Makefile - trivial makefile, read it.
 
-Hello.js - produced when you run make. Contains JTalk + Hello.st + a main call
+Hello.js - compiled from Hello.st.
+Program.js - compile from Hello.st and includes Amber, can run from node.
 
-To play, do this:
+To compile and run.
+	grunt amberc:hello
+	./hello
 
-make
-./hello