Skip to content

Commit 0a43630

Browse files
committed
fix: update dependencies and typings
1 parent bb78f87 commit 0a43630

File tree

4 files changed

+68
-24
lines changed

4 files changed

+68
-24
lines changed

index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference path="declarations.d.ts" />
22
import * as minify from 'minify-html-literals';
3+
import { Plugin, SourceDescription } from 'rollup';
34
import { createFilter } from 'rollup-pluginutils';
45

56
/**
@@ -34,7 +35,7 @@ export interface Options {
3435
filter?: (id: string) => boolean;
3536
}
3637

37-
export default function(options: Options = {}) {
38+
export default function(options: Options = {}): Plugin {
3839
if (!options.minifyHTMLLiterals) {
3940
options.minifyHTMLLiterals = minify.minifyHTMLLiterals;
4041
}
@@ -46,10 +47,10 @@ export default function(options: Options = {}) {
4647
const minifyOptions = <minify.DefaultOptions>options.options || {};
4748
return {
4849
name: 'minify-html-literals',
49-
transform(this: any, code: string, id: string) {
50+
transform(code: string, id: string) {
5051
if (options.filter!(id)) {
5152
try {
52-
return options.minifyHTMLLiterals!(code, {
53+
return <SourceDescription>options.minifyHTMLLiterals!(code, {
5354
...minifyOptions,
5455
fileName: id
5556
});

package-lock.json

Lines changed: 57 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@
5656
"all": true
5757
},
5858
"dependencies": {
59-
"minify-html-literals": "^1.0.1",
59+
"minify-html-literals": "^1.0.2",
6060
"rollup-pluginutils": "^2.3.0"
6161
},
62+
"peerDependencies": {
63+
"rollup": "^0.65.2"
64+
},
6265
"devDependencies": {
6366
"@types/chai": "^4.1.4",
6467
"@types/mocha": "^5.2.5",
@@ -72,6 +75,7 @@
7275
"nyc": "^12.0.2",
7376
"prettier": "^1.13.7",
7477
"rimraf": "^2.6.2",
78+
"rollup": "^0.65.2",
7579
"sinon": "^6.1.4",
7680
"source-map-support": "^0.5.6",
7781
"standard-version": "^4.4.0",

tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"declaration": true,
44
"module": "commonjs",
55
"moduleResolution": "node",
6+
"noUnusedLocals": true,
7+
"noUnusedParameters": true,
68
"sourceMap": true,
79
"strict": true,
810
"target": "esnext"

0 commit comments

Comments
 (0)