Created
August 13, 2015 16:42
-
-
Save hkaya/d1666d609423e8452ab5 to your computer and use it in GitHub Desktop.
nw13 test-app index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
var fs = nw.require('fs'); | |
console.log(fs.readdirSync('.')); // prints [] | |
console.log(fs.readdirSync('..')); // prints [] | |
console.log(fs.readdirSync('/')); // prints [] | |
//console.log(fs.readdirSync('/tmp')); // throws ENOENT | |
// var _ = nw.require('lodash'); // cannot find module | |
nw.require('./test.js'); // cannot find module | |
</script> | |
</head> | |
<body> | |
Hello. | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment