Skip to content

Commit

Permalink
Update documentation for v0.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrantly committed May 6, 2015
1 parent 7bcf834 commit 67b7294
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 31 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v0.4.0

- TypeScript 1.5 support! (#14)
- tsconfig.json support (#2, #9)
- ES6 target support
- Remove TS-related options in favor of specifying them in tsconfig.json
- Add `configFileName` option for custom tsconfig files

## v0.3.4

- Exclude TS 1.5 as a dependency since there are breaking changes
Expand Down
45 changes: 14 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
npm install ts-loader
```

### Upgrading

Take advantage of the [Changelog](CHANGELOG.md) and [Upgrade Guide](UPGRADE.md).

### Running

Use webpack like normal, including `webpack --watch` and `webpack-dev-server`, or through another
Expand All @@ -26,54 +30,33 @@ module.exports = {
},
module: {
loaders: [
{ test: /\.ts$/, loader: 'ts-loader?sourceMap&target=ES3' }
{ test: /\.ts$/, loader: 'ts-loader' }
]
}
}
```

#### Options

##### target *(string)*

Specify the TypeScript output target.

- ES3
- **ES5 (default)**
- ES6

##### module *(string)*

Specify the type of modules that TypeScript emits.

- **CommonJS (default)**
- AMD

##### sourceMap *(boolean) (default=false)*

Specify whether or not TypeScript emits source maps.

##### noImplicitAny *(boolean) (default=false)*

Specify whether or not TypeScript will allow inferring the `any` type.
Most TypeScript-related options should be set using a
[tsconfig.json](https://github.com/Microsoft/TypeScript/wiki/tsconfig.json)
file. There are a few loader-specific options you can set although in general
you should not need to.

##### compiler *(string) (default='typescript')*

Allows use of TypeScript compilers other than the official one. Should be
set to the NPM name of the compiler.

##### files *(array of string) (default=[])*

Allows additional files to be manually passed to the TypeScript compiler.
For example, if you want to make a declaration file available without
actually referencing it in code with a `/// <references />` tag. Should
consist of rooted paths.

##### instance *(string)*

Advanced option to force files to go through different instances of the
TypeScript compiler. Can be used to force segregation between different parts
of your code. Can typically be ignored.
of your code.

##### configFileName *(string) (default=tsconfig.json)*

Allows you to specify a custom configuration file.

### Loading other resources and code splitting

Expand Down
11 changes: 11 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Upgrade Guide

## v0.3.x to v0.4.x

This release added support for TypeScript 1.5. One of the major changes
introduced in TypeScript 1.5 is the
[tsconfig.json](https://github.com/Microsoft/TypeScript/wiki/tsconfig.json)
file. All of the TypeScript options that were previously defined through
the loader querystring (`module`, `target`, etc) should now be specified
in the tsconfig.json file instead. The querystring options have been
removed.

0 comments on commit 67b7294

Please sign in to comment.