Bladeren bron

Merge pull request #645 from herby/gh-630

Fixes #630
Nicolas Petton 11 jaren geleden
bovenliggende
commit
1ba6db617e
9 gewijzigde bestanden met toevoegingen van 8 en 12 verwijderingen
  1. 1 1
      Gruntfile.js
  2. 1 2
      bin/amber
  3. 1 0
      bin/amber-cli.js
  4. 1 0
      bin/amber.bat
  5. 1 0
      bin/amberc.bat
  6. 1 0
      bin/amberc.js
  7. 0 3
      bin/server
  8. 0 3
      bin/server.bat
  9. 2 3
      package.json

+ 1 - 1
Gruntfile.js

@@ -98,7 +98,7 @@ module.exports = function(grunt) {
             'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', '@parser'
         ],
         main_class: 'AmberCli',
-        output_name: 'amber-cli',
+        output_name: '../../bin/amber-cli',
         amd_namespace: 'amber_cli'
       }
     },

+ 1 - 2
bin/amber

@@ -1,3 +1,2 @@
 #!/bin/bash
-cd `dirname $0`/..
-node ./cli/js/amber-cli.js repl
+node `dirname $0`/amber-cli.js $@

+ 1 - 0
cli/js/amber-cli.js → bin/amber-cli.js

@@ -1,3 +1,4 @@
+#!/usr/bin/env node
 var define = (function amdefine(module, requireFn) {
     'use strict';
     var defineCache = {},

+ 1 - 0
bin/amber.bat

@@ -0,0 +1 @@
+@node "%~dp0\amber-cli.js" %*

+ 1 - 0
bin/amberc.bat

@@ -0,0 +1 @@
+@node "%~dp0\amberc" %*

+ 1 - 0
bin/amberc.js

@@ -608,6 +608,7 @@ AmberC.prototype.compose_js_files = function() {
 	});
 
 	var builder = createConcatenator();
+	builder.add('#!/usr/bin/env node');
 	builder.start();
 
 	program_files.forEach(function(file) {

+ 0 - 3
bin/server

@@ -1,3 +0,0 @@
-#!/bin/bash
-cd `dirname $0`/..
-node ./cli/js/amber-cli.js serve $@

+ 0 - 3
bin/server.bat

@@ -1,3 +0,0 @@
-@cd "%~dp0\.." 
-@node .\cli\js\amber-cli.js serve %*
-

+ 2 - 3
package.json

@@ -26,9 +26,8 @@
     "node": ">=0.8.0"
   },
   "bin": {
-    "amber": "./bin/amber",
-    "amberc": "./bin/amberc",
-    "ambers": "./bin/server"
+    "amber": "./bin/amber-cli.js",
+    "amberc": "./bin/amberc"
   },
   "scripts": {
     "test": "grunt amberc:amber_test_runner && node ./test/amber_test_runner.js"