$ nodebrew
nodebrew 0.6.0
Usage:
nodebrew help Show this message
nodebrew install <version> Download and install a <version> (compile from source) nodebrew install-binary <version> Download and install a <version> (binary file) nodebrew uninstall <version> Uninstall a version
nodebrew use <version> Use <version>
nodebrew list List installed versions
nodebrew ls Alias for`list` nodebrew ls-remote List remote versions
nodebrew ls-all List remote and installed versions
nodebrew alias <key> <version> Set alias to version
nodebrew unalias <key> Remove aliasnodebrew clean <version> | all Remove source file
nodebrew selfupdate Update nodebrew
nodebrew migrate-package <version> Install global NPM packages contained in <version> to current version
Example:
nodebrew install v0.6.0 Install a specific version number
nodebrew use v0.6.0 Use a specific version number
最新をインストール
123456
$ nodebrew install latest
$ nodebrew list
v0.9.4
current: none
$ nodebrew use v0.9.4
これでnpmコマンドも使用出来るようになっているので、npmでTypeScriptをインストール
1
$ npm install -g typescript
TypeScript -> JavaScriptの変換
123456789101112131415161718192021
$ tsc
Syntax: tsc [options][file ..]Examples: tsc hello.ts
tsc --out foo.js foo.ts
tsc @args.txt
Options:
-c, --comments Emit comments to output
--declaration Generates corresponding .d.ts file
-e, --exec Execute the script after compilation
-h, --help Print this message
--module KIND Specify module code generation: "commonjs"(default) or "amd" --nolib Do not include a default lib.d.ts with global declarations
--out FILE Concatenate and emit output to single file
--sourcemap Generates corresponding .map file
--target VER Specify ECMAScript target version: "ES3"(default), or "ES5" -w, --watch Watch output files
@<file> Insert command line options and files from a file.
$ tsc test.ts