Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minify-html-literals

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minify-html-literals - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

10

CHANGELOG.md

@@ -5,8 +5,12 @@ # Change Log

<a name="1.0.0"></a>
<a name="1.0.1"></a>
# 1.0.0 (2018-07-23)
## 1.0.1 (2018-07-24)
### Bug Fixes
- option type errors ([b917607](https://github.com/asyncLiz/minify-html-literals/commit/b917607))
### Features
- initial release ([b7f0fe7](https://github.com/asyncLiz/minify-html-literals/commit/b7f0fe7))
- initial release ([cadf7c2](https://github.com/asyncLiz/minify-html-literals/commit/cadf7c2))
{
"name": "minify-html-literals",
"version": "1.0.0",
"version": "1.0.1",
"description": "Minify HTML template literal strings",

@@ -57,9 +57,9 @@ "main": "index.js",

"dependencies": {
"@types/html-minifier": "^3.5.2",
"html-minifier": "^3.5.19",
"magic-string": "^0.25.0",
"parse-literals": "^1.0.0"
"parse-literals": "^1.0.2"
},
"devDependencies": {
"@types/chai": "^4.1.4",
"@types/html-minifier": "^3.5.2",
"@types/mocha": "^5.2.5",

@@ -66,0 +66,0 @@ "@types/node": "^10.5.2",

@@ -22,7 +22,7 @@ import { SourceMapOptions } from 'magic-string';

*/
export interface CustomOptions<O> extends BaseOptions {
export interface CustomOptions<S extends Strategy> extends BaseOptions {
/**
* HTML minification options.
*/
minifyOptions?: O;
minifyOptions?: S extends Strategy<infer O> ? O : never;
/**

@@ -32,3 +32,3 @@ * Override the default strategy for how to minify HTML. The default is to

*/
strategy: Strategy<O>;
strategy: S;
}

@@ -181,3 +181,3 @@ /**

*/
export declare function minifyHTMLLiterals<O>(source: string, options: CustomOptions<O>): Result | null;
export declare function minifyHTMLLiterals(source: string, options: DefaultOptions): Result | null;
/**

@@ -190,2 +190,2 @@ * Minifies all HTML template literals in the provided source string.

*/
export declare function minifyHTMLLiterals(source: string, options: DefaultOptions): Result | null;
export declare function minifyHTMLLiterals<S extends Strategy>(source: string, options: CustomOptions<S>): Result | null;

@@ -30,7 +30,7 @@ import MagicString, { DecodedSourceMap, SourceMapOptions } from 'magic-string';

*/
export interface CustomOptions<O> extends BaseOptions {
export interface CustomOptions<S extends Strategy> extends BaseOptions {
/**
* HTML minification options.
*/
minifyOptions?: O;
minifyOptions?: S extends Strategy<infer O> ? O : never;
/**

@@ -40,3 +40,3 @@ * Override the default strategy for how to minify HTML. The default is to

*/
strategy: Strategy<O>;
strategy: S;
}

@@ -221,5 +221,5 @@

*/
export function minifyHTMLLiterals<O>(
export function minifyHTMLLiterals(
source: string,
options: CustomOptions<O>
options: DefaultOptions
): Result | null;

@@ -233,5 +233,5 @@ /**

*/
export function minifyHTMLLiterals(
export function minifyHTMLLiterals<S extends Strategy>(
source: string,
options: DefaultOptions
options: CustomOptions<S>
): Result | null;

@@ -238,0 +238,0 @@ export function minifyHTMLLiterals(

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc