diff --git a/README.md b/README.md index c9f8390..26d30d5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,15 @@ # TypeScript Samples +Most of the samples here will assume that you have TypeScript installed. +You can get TypeScript with Visual Studio, NuGet, or with npm: + +```shell +npm install -g typescript +``` + +To compile each sample, `cd` into the directory and use the `tsc` command to compile. +`tsc` will use each directory's `tsconfig.json` to get specific compiler options. + ##### [AMD Modules](amd/README.md) ##### [Angular Seed TypeScript](angular1/README.md) diff --git a/browserify/README.md b/browserify/README.md index 092fe7d..ea600ee 100644 --- a/browserify/README.md +++ b/browserify/README.md @@ -1,45 +1,63 @@ **Install Browserify** -``` + +```shell npm install -g browserify ``` **Fetch dependencies** -``` + +```shell npm install ``` **Compile .ts files** -``` + +Either enter the following command + +```shell node node_modules/typescript/bin/tsc.js ``` -shortcut for this command -``` + +or use the `tsc` script from our `package.json` with + +```shell npm run tsc ``` **Run Browserify** -``` + +Either enter the following command + +```shell browserify src/app.js -o bundle.js -s app ``` -shortcut for this command -``` + +or use the `browserify` script from our `package.json` with + +```shell npm run browserify ``` **Start http-server** -``` + +Either enter the following command + +```shell node node_modules/http-server/bin/http-server -o ``` -shortcut for this command + +or use the `listen` script from our `package.json` with + ``` npm run listen ``` -By default http-server listens on port 8080. If this port is taken use '-p' to specify free port. - +By default http-server listens on port `8080`. +If this port is taken, use '-p ####' to specify a free port, where `####` is the available port. **Shortcut for running all steps in a batch** + ``` npm run all ``` \ No newline at end of file