shellscript-ts
A nodejs module for creating shellscript in TypeScript.
Important
This module is deprecated. It is no longer maintained. Please use ES6 on nodejs v4 or later.
#!/usr/bin/env node --use_strict
class HelloWorld {
sayHello() {
console.log("Hello, World!");
}
}
new HelloWorld().sayHello();
Install
With npm do:
$ npm install -g shellscript-ts
Usage
Put a shebang line on top of your shellscript.
#!/usr/bin/env shellscript-ts
Sample shellscript
Parse arguments
#!/usr/bin/env shellscript-ts /// .usage'Sample script for shellscript-ts.\nUsage: $0 [options] URL' // --help .describe'h', 'Print this message' .alias'h', 'help' .default'h', false .boolean; new ParseArgs.execute;
HTTP GET
#!/usr/bin/env shellscript-ts /// ; new HttpClient.execute;
Building
In order to build the shellscript-ts, ensure that you have git and node.js installed.
Clone a copy of the repository:
$ git clone git@github.com:CODEYA/node-shellscript-ts.git
Change to the shellscript-ts directory:
$ cd node-shellscript-ts
Install dev dependencies:
$ npm install
Build the shellscript-ts:
$ gulp