diff --git a/CHANGELOG.md b/CHANGELOG.md index 4212dd327..cd4490cd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index ebfed3736..eb064159a 100644 --- a/README.md +++ b/README.md @@ -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 @@ -26,7 +30,7 @@ module.exports = { }, module: { loaders: [ - { test: /\.ts$/, loader: 'ts-loader?sourceMap&target=ES3' } + { test: /\.ts$/, loader: 'ts-loader' } ] } } @@ -34,46 +38,25 @@ module.exports = { #### 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 `/// ` 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 diff --git a/UPGRADE.md b/UPGRADE.md new file mode 100644 index 000000000..d38588c7d --- /dev/null +++ b/UPGRADE.md @@ -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. \ No newline at end of file