source: other-projects/FileTransfer-WebSocketPair/Themes/themebuilder/bin/phantomjs-1.9.2-windows/examples/stdin-stdout-stderr.js@ 31525

Last change on this file since 31525 was 31525, checked in by ak19, 7 years ago

Nathan provided more stuff: Themes folder contains Sencha's Themebuilder which generates GXT Themes. It includes the .theme and generated .jar files for the project theme.

File size: 602 bytes
Line 
1var system = require('system');
2
3system.stdout.write('Hello, system.stdout.write!');
4system.stdout.writeLine('\nHello, system.stdout.writeLine!');
5
6system.stderr.write('Hello, system.stderr.write!');
7system.stderr.writeLine('\nHello, system.stderr.writeLine!');
8
9system.stdout.writeLine('system.stdin.readLine(): ');
10var line = system.stdin.readLine();
11system.stdout.writeLine(JSON.stringify(line));
12
13// This is essentially a `readAll`
14system.stdout.writeLine('system.stdin.read(5): (ctrl+D to end)');
15var input = system.stdin.read(5);
16system.stdout.writeLine(JSON.stringify(input));
17
18phantom.exit(0);
Note: See TracBrowser for help on using the repository browser.