Skip to content

Commit 4a4d012

Browse files
Merge pull request microsoft#20 from ISNIT0/ISNIT0/readme-updates
Updated README and fixed fresh build
2 parents f1b9f14 + 0dfccdd commit 4a4d012

File tree

6 files changed

+2699
-13
lines changed

6 files changed

+2699
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
public
3+
gulpfile.js

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
TODO: finish README
1+
A web-based search for `@types/*` packages.
22

3-
Online [here](http://microsoft.github.io/TypeSearch).
3+
When using TypeScript an easy way to install library *Type Definitions* is using "@types" npm packages.
44

5-
### Run locally
5+
View the running site: [http://microsoft.github.io/TypeSearch](http://microsoft.github.io/TypeSearch).
66

7-
Run `gulp`, then see [localhost](http://localhost).
7+
### Run locally
8+
```bash
9+
npm i
10+
npm run build
11+
gulp serve --port 8080
12+
```
813

914
### Publish
10-
1115
`gulp publish`

gulpfile.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ gulp.task("script", () => {
2020
const tsProject = ts.createProject("assets/script/tsconfig.json", {
2121
typescript: require("typescript")
2222
});
23-
return tsProject.src().pipe(ts(tsProject)).js.pipe(gulp.dest(outDir("script")));
23+
return tsProject.src().pipe(ts(<ts.Params>tsProject)).js.pipe(gulp.dest(outDir("script")));
2424
});
2525

2626
function copy(src: string, dest: string): NodeJS.ReadWriteStream {
@@ -38,8 +38,9 @@ gulp.task("build", (cb: any) => {
3838

3939
gulp.task("serve", () => {
4040
const server = createServer({ root: "public" });
41-
console.log("\nServing to localhost\n");
42-
server.listen(80);
41+
const port = Number(process.argv[4]) || 80;
42+
console.log(`\nServing on http://localhost:${port}\n`);
43+
server.listen(port);
4344
});
4445

4546
gulp.task("watch", ["build", "serve"], () => {

0 commit comments

Comments
 (0)