Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Updated README and fixed fresh build
Browse files Browse the repository at this point in the history
  • Loading branch information
ISNIT0 committed Oct 16, 2017
1 parent f1b9f14 commit 0dfccdd
Show file tree
Hide file tree
Showing 6 changed files with 2,699 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
public
gulpfile.js
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
TODO: finish README
A web-based search for `@types/*` packages.

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

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

Run `gulp`, then see [localhost](http://localhost).
### Run locally
```bash
npm i
npm run build
gulp serve --port 8080
```

### Publish

`gulp publish`
7 changes: 4 additions & 3 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gulp.task("script", () => {
const tsProject = ts.createProject("assets/script/tsconfig.json", {
typescript: require("typescript")
});
return tsProject.src().pipe(ts(tsProject)).js.pipe(gulp.dest(outDir("script")));
return tsProject.src().pipe(ts(<ts.Params>tsProject)).js.pipe(gulp.dest(outDir("script")));
});

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

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

gulp.task("watch", ["build", "serve"], () => {
Expand Down
Loading

0 comments on commit 0dfccdd

Please sign in to comment.