Skip to content

Commit cda0b9c

Browse files
committed
Adjust Readme to match newest plugin features
1 parent 35c6983 commit cda0b9c

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
elixir-typescript
1+
elixir-typescript
22
========================
33

44
**(forked from laravel-elixir-typescript by [MikeyAlder](https://github.com/MikeyAlder/laravel-elixir-typescript))**
@@ -9,13 +9,13 @@ You have to install [Laravel's Elixir](http://laravel.com/docs/master/elixir)(Ve
99
## Upgrade
1010
The signature was changed to the following:
1111
```
12-
mix.typescript(outputFileName, outputFolder, search, options);
12+
mix.typescript(src, output, options);
1313
```
1414

1515
## Installation
1616
Install with Node.js
1717
```
18-
npm install elixir-typescript
18+
npm install elixir-typescript --save
1919
```
2020

2121
## Usage
@@ -30,23 +30,33 @@ var elixir = require('laravel-elixir');
3030
var elixirTypscript = require('elixir-typescript');
3131
3232
elixir(function(mix) {
33-
mix.typescript('app.js');
33+
mix.typescript('app.ts');
3434
});
3535
```
3636

37-
This will compile all *.ts files in your `resources/assets/typescript/` folder and concat the compiled content into `public/js/app.js`.
37+
This will compile the `app.ts` file in `resources/assets/typescript/` and concat the compiled content into `public/js/app.js`.
3838

39-
If you'd like to output to a different directory than the default `public/js`, then you may override this as well.
39+
If you'd like to output to a different directory than the default `public/js`, then you may override this by provide a path for `output` as well.
4040

4141
```
42-
mix.typescript('app.js', 'public/js/foo/bar');
42+
mix.typescript('app.js', 'public/js/foo/bar.js');
4343
```
4444

45+
Further you could insert multiple files like
46+
47+
```
48+
elixir(function(mix) {
49+
mix.typescript(['module1.ts', 'module2.ts']);
50+
});
51+
```
52+
53+
### tsconfig.json
54+
The project file is also supported. Just put your file into the typescript asset folder and the pluging will automatically use it.
55+
4556
## Parameters
4657

4758
Bellow is the list of the available parameters:
4859

49-
- **outputFileName**: Filename for output
50-
- **outputFolder**(optional): Where to place the output file. Default: `public/js/`
51-
- **search** (optional): filter for input files, can also be a direct path to one file like `app.ts`. Defaults: `/**/*.ts`
60+
- **src**: Filename for output
61+
- **output**(optional): Where to place the output file. Default: `public/js/`
5262
- **options** (optional): Options to forward to the `gulp-typescript` used for compiling. All options under https://github.com/ivogabe/gulp-typescript#options

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "elixir-typescript",
3-
"version": "1.1.2",
3+
"version": "2.0.0",
44
"description": "Laravel Elixir Typescript Compiler Extension",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)