使用Node.js的错误崇高的文本2的JavaScript编译系统

问题描述:

我使用Node.js的,使构建系统的崇高文字2打造的JavaScript code。我知道如何设置的崇高基本构建系统,但是这一次真的是给我的问题。

I'm using Node.js to make a build system in Sublime Text 2 to build JavaScript code. I know how to setup basic build systems in Sublime, but this one is really giving me problems.

JavaScript示例code:

JavaScript example code:

var end = 10;
for (var i = 0; i < end; i++) {
  console.log("hello world!");  
};

第一次尝试:

    {
    "cmd": ["node", "$file"]
    }

在控制台返回此: [完成了0.1秒]

第二个尝试:

{
"cmd": ["node", "$file", "$file_base_name"],
"working_dir": "${project_path:${folder}}",
"selector": "#.js"
}

返回同样的事情。

returns the same thing.

任何帮助将是非常美联社preciated(我花在搜索谷歌超过2小时)。

Any help would be much appreciated (I've spend over 2 hours searching google).

编辑:修正了:同样的结果。

Fixed For to for : Same result.

在崇高文本2你建立之前,必须保存您的.js文件,以上的结果会发生。

In Sublime Text 2 you must save your .js file before you build, or the result above will happen.

简单的解决方法是保存文件(显然)!

Simple fix is to save the file (obviously)!