node-webkit is an app runtime based on Chromium
and node.js
. You can write native apps in HTML and Javascript with node-webkit. It also lets you call Node.js modules directly from the DOM and enables a new way of writing native applications with all Web technologies.
于是便让人想起了atom上用的那些元素,似乎真的和这个是一样的。
下载地址:
https://github.com/rogerwang/node-webkit
找到对应的版本
将app复制到Application,接着把下面的alias添加到~/.bash_profile
# alias to nw
alias nw="/Applications/node-webkit.app/Contents/MacOS/node-webkit"
记得去source ~/.bash_profile
创建一个index.html
<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
We are using node.js <script>document.write(process.version)</script>.
</body>
</html>
以及package.json
{
"name": "nw-demo",
"main": "index.html"
}
接着压缩一个app.nw
zip app.nw index.html package.json
运行便是
nw app.nw
于是我们便可以创建一个editor??
围观我的Github Idea墙, 也许,你会遇到心仪的项目