update: readme

This commit is contained in:
zhongsp 2015-04-11 10:41:21 +08:00
parent bcad031f5a
commit ef2cb9e05d

View File

@ -7,3 +7,29 @@ TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
* Read [TypeScript Language Specification in Simplified Chinese (in translating...)](./doc/TypeScript Language Specification.md)
I'd love for you to contribute to the translation:)
## Using Gulp with TypeScript
Install `gulp` and `gulp-typescript`. See [package.json](./package.json).
```sh
$ npm install --global gulp
$ npm install --save-dev gulp gulp-typescript
```
Config gulp. See [gulpfile.js](./gulpfile.js).
```js
gulp.task('typescript', function() {
var tsResult = gulp.src('ts/*.ts')
.pipe(ts({
target: 'ES5',
declarationFiles: false,
noExternalResolve: true
}));
tsResult.dts.pipe(gulp.dest('dist/tsdefinitions'));
return tsResult.js.pipe(gulp.dest('dist/typescript'));
});
```