1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| <!doctype html>
| <html>
| <head>
| <meta charset="utf-8">
| <title>Node-webkit-based module test</title>
| <script>
| function nwModuleTest(){
| var util = require('util');
| var moduleFolder = require('nw.gui').App.argv[0];
| try {
| require(moduleFolder);
| } catch(e) {
| if( process.platform !== 'win32' ){
| util.log('nw-pre-gyp error:');
| util.log(e.stack);
| }
| process.exit(1);
| }
| process.exit(0);
| }
| </script>
| </head>
| <body onload="nwModuleTest()">
| <h1>Node-webkit-based module test</h1>
| </body>
| </html>
|
|