Skip to content

Commit 0c8c452

Browse files
committed
switch to rollup-plugin-typescript2
adjust test to verify generation of `.d.ts`.
1 parent 47ccb24 commit 0c8c452

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"rollup-plugin-preserve-shebang": "^0.1.6",
6060
"rollup-plugin-sizes": "^0.4.2",
6161
"rollup-plugin-strict-alias": "^1.0.0",
62-
"rollup-plugin-typescript": "^0.8.1",
62+
"rollup-plugin-typescript2": "^0.10.0",
6363
"rollup-plugin-uglify": "^3.0.0",
6464
"sade": "^1.3.1",
6565
"tslib": "^1.9.0",

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import alias from 'rollup-plugin-strict-alias';
1717
import gzipSize from 'gzip-size';
1818
import prettyBytes from 'pretty-bytes';
1919
import shebangPlugin from 'rollup-plugin-preserve-shebang';
20-
import typescript from 'rollup-plugin-typescript';
20+
import typescript from 'rollup-plugin-typescript2';
2121
import flow from './lib/flow-plugin';
2222
import camelCase from 'camelcase';
2323

test/__snapshots__/index.test.js.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Build output to dist:
4141
exports[`fixtures ts-demo 1`] = `
4242
"ts-demo
4343
dist
44+
car.d.ts
45+
index.d.ts
4446
ts-demo.js
4547
ts-demo.js.map
4648
ts-demo.m.js
@@ -50,6 +52,7 @@ exports[`fixtures ts-demo 1`] = `
5052
src
5153
car.ts
5254
index.ts
55+
tsconfig.json
5356
5457
5558
Build output to dist:

test/fixtures/ts-demo/src/car.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
interface Driveable {
1+
export interface Driveable {
22
drive(distance: number): boolean;
33
}
44

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"compilerOptions": {
3+
"declaration": true
4+
}
5+
}

0 commit comments

Comments
 (0)