From d0078f4e7c904c8136395ee8b6b039f4e8c161da Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 21 Dec 2016 17:49:56 -0800 Subject: [PATCH] Add JSPM install and usage documentation --- README.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ecd2dbf..a26b99d 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ npm install tslib bower install tslib ``` +## JSPM + +```sh +jspm install npm:tslib +``` + # Usage Set the `importHelpers` compiler option on the command line: @@ -36,9 +42,9 @@ or in your tsconfig.json: } ``` -#### For bower users +#### For bower and JSPM users -You will need to add a `paths` mapping for `tslib`, e.g.: +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: ```json { @@ -53,6 +59,22 @@ You will need to add a `paths` mapping for `tslib`, e.g.: } ``` +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "System", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@1.3.0/tslib.d.ts"] + } + } +} +``` + + # Contribute There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.