This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree 2 files changed +40
-12
lines changed
2 files changed +40
-12
lines changed Original file line number Diff line number Diff line change 1
1
# TypeScript Samples
2
2
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
+
3
13
##### [ AMD Modules] ( amd/README.md )
4
14
5
15
##### [ Angular Seed TypeScript] ( angular1/README.md )
Original file line number Diff line number Diff line change 1
1
** Install Browserify**
2
- ```
2
+
3
+ ``` shell
3
4
npm install -g browserify
4
5
```
5
6
6
7
** Fetch dependencies**
7
- ```
8
+
9
+ ``` shell
8
10
npm install
9
11
```
10
12
11
13
** Compile .ts files**
12
- ```
14
+
15
+ Either enter the following command
16
+
17
+ ``` shell
13
18
node node_modules/typescript/bin/tsc.js
14
19
```
15
- shortcut for this command
16
- ```
20
+
21
+ or use the ` tsc ` script from our ` package.json ` with
22
+
23
+ ``` shell
17
24
npm run tsc
18
25
```
19
26
20
27
** Run Browserify**
21
- ```
28
+
29
+ Either enter the following command
30
+
31
+ ``` shell
22
32
browserify src/app.js -o bundle.js -s app
23
33
```
24
- shortcut for this command
25
- ```
34
+
35
+ or use the ` browserify ` script from our ` package.json ` with
36
+
37
+ ``` shell
26
38
npm run browserify
27
39
28
40
```
29
41
30
42
** Start http-server**
31
- ```
43
+
44
+ Either enter the following command
45
+
46
+ ``` shell
32
47
node node_modules/http-server/bin/http-server -o
33
48
```
34
- shortcut for this command
49
+
50
+ or use the ` listen ` script from our ` package.json ` with
51
+
35
52
```
36
53
npm run listen
37
54
```
38
55
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.
41
58
42
59
** Shortcut for running all steps in a batch**
60
+
43
61
```
44
62
npm run all
45
63
```
You can’t perform that action at this time.
0 commit comments