This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +40
-12
lines changed Expand file tree Collapse file tree 2 files changed +40
-12
lines changed Original file line number Diff line number Diff line change 11# TypeScript Samples
22
3+ Most of the samples here will assume that you have TypeScript installed.
4+ You can get TypeScript with Visual Studio, NuGet, or with npm:
5+
6+ ``` shell
7+ npm install -g typescript
8+ ```
9+
10+ To compile each sample, ` cd ` into the directory and use the ` tsc ` command to compile.
11+ ` tsc ` will use each directory's ` tsconfig.json ` to get specific compiler options.
12+
313##### [ AMD Modules] ( amd/README.md )
414
515##### [ Angular Seed TypeScript] ( angular1/README.md )
Original file line number Diff line number Diff line change 11** Install Browserify**
2- ```
2+
3+ ``` shell
34npm install -g browserify
45```
56
67** Fetch dependencies**
7- ```
8+
9+ ``` shell
810npm install
911```
1012
1113** Compile .ts files**
12- ```
14+
15+ Either enter the following command
16+
17+ ``` shell
1318node node_modules/typescript/bin/tsc.js
1419```
15- shortcut for this command
16- ```
20+
21+ or use the ` tsc ` script from our ` package.json ` with
22+
23+ ``` shell
1724npm run tsc
1825```
1926
2027** Run Browserify**
21- ```
28+
29+ Either enter the following command
30+
31+ ``` shell
2232browserify src/app.js -o bundle.js -s app
2333```
24- shortcut for this command
25- ```
34+
35+ or use the ` browserify ` script from our ` package.json ` with
36+
37+ ``` shell
2638npm run browserify
2739
2840```
2941
3042** Start http-server**
31- ```
43+
44+ Either enter the following command
45+
46+ ``` shell
3247node node_modules/http-server/bin/http-server -o
3348```
34- shortcut for this command
49+
50+ or use the ` listen ` script from our ` package.json ` with
51+
3552```
3653npm run listen
3754```
3855
39- By default http-server listens on port 8080. If this port is taken use '-p' to specify free port.
40-
56+ By default http-server listens on port ` 8080 ` .
57+ If this port is taken, use '-p ####' to specify a free port, where ` #### ` is the available port.
4158
4259** Shortcut for running all steps in a batch**
60+
4361```
4462npm run all
4563```
You can’t perform that action at this time.
0 commit comments