Create
desktop applications with Javascript
and node-webkit
Scopes
and stuff
No Cross-Scope communication
No conflicts with dependency management
One scope to rule them all.
Divide and Conquer
Node-webkit
https://github.com/rogerwang/node-webkit
index.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"
}
Build it
zip app.nw index.html package.json
Or use GRUNT
https://github.com/Dica-Developer/generator-node-webkit
4 Errors i made you may can lean from
living in a box
keep your data directories away from the code
// hack user config file into home dir
process.env['USER_CONF'] =
(process.env.HOME ||
process.env.HOMEPATH ||
process.env.USERPROFILE
) + "/.app.json";
Haste makes waste
Building time can easily be greater then 40 seconds.
except you´re "smart"
// in /Users/moritzspindelhirn/my-app/launcher/main.js
process.chdir('/Users/moritzspindelhirn/my-app/app');
var starter = path.join(process.cwd(), 'app.js');
Overengineering
Loading css and images from disk is pretty fast you know.
Why uglify and minify ?
You may don´t need to combine you stuff (?)