mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 05:31:03 +00:00
Update README.md
This commit is contained in:
parent
0a9f5d8ddb
commit
0638be31c5
25
README.md
25
README.md
|
@ -24,6 +24,31 @@ WelsonJS - Build a Windows desktop apps with JavaScript, HTML, and CSS based on
|
||||||
- lib/timer (`setTimeout` implementation for not supported environment)
|
- lib/timer (`setTimeout` implementation for not supported environment)
|
||||||
- lib/powershell (Windows Powershell interface)
|
- lib/powershell (Windows Powershell interface)
|
||||||
|
|
||||||
|
## `sayhello` example
|
||||||
|
|
||||||
|
### File `lib/sayhello-lib.js`
|
||||||
|
```
|
||||||
|
exports.VERSIONINFO = "Example library (example-lib.js) version 0.1
|
||||||
|
exports.global = global;
|
||||||
|
exports.require = global.require;
|
||||||
|
|
||||||
|
exports.say = function() {
|
||||||
|
console.log("hello");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### File `sayhello.js`
|
||||||
|
```
|
||||||
|
var sayhello = require("lib/sayhello");
|
||||||
|
sayhello.say();
|
||||||
|
```
|
||||||
|
|
||||||
|
### Execute file on the command prompt
|
||||||
|
```
|
||||||
|
C:\Users\John> cscript app.js sayhello
|
||||||
|
hello
|
||||||
|
```
|
||||||
|
|
||||||
## Related projects
|
## Related projects
|
||||||
- [gnh1201/wsh-js-gtk](https://github.com/gnh1201/wsh-js-gtk) - GTK GUI ported to Windows Scripting Host - Javascript (Microsoft JScript) (wsh-js)
|
- [gnh1201/wsh-js-gtk](https://github.com/gnh1201/wsh-js-gtk) - GTK GUI ported to Windows Scripting Host - Javascript (Microsoft JScript) (wsh-js)
|
||||||
- [gnh1201/wsh-json](https://github.com/gnh1201/wsh-json) - JSON stringify/parse (encode/decode) for Windows Scripting Host
|
- [gnh1201/wsh-json](https://github.com/gnh1201/wsh-json) - JSON stringify/parse (encode/decode) for Windows Scripting Host
|
||||||
|
|
Loading…
Reference in New Issue
Block a user