mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Added UglifyCSS typings (#9584)
* Added UglifyCSS typings * Added missing return types
This commit is contained in:
committed by
Horiuchi_H
parent
1c8c523ed8
commit
a8474f733e
@@ -0,0 +1,19 @@
|
||||
/// <reference path="uglifycss.d.ts" />
|
||||
|
||||
import * as UglifyCSS from 'uglifycss';
|
||||
|
||||
var test1 = UglifyCSS.processString('some css string');
|
||||
|
||||
var test2 = UglifyCSS.processString('some css string', {
|
||||
maxLineLen: 0,
|
||||
expandVars: true,
|
||||
uglyComments: true,
|
||||
cuteComments: true
|
||||
});
|
||||
|
||||
var test3 = UglifyCSS.processFiles(['/path/to/file']);
|
||||
|
||||
var test4 = UglifyCSS.processFiles(['/path/to/file'], {
|
||||
maxLineLen: 0,
|
||||
cuteComments: true
|
||||
});
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
// Type definitions for UglifyCSS v0.0.20
|
||||
// Project: https://github.com/fmarcia/UglifyCSS
|
||||
// Definitions by: gevik Babakhani <https://github.com/blendsdk>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module "uglifycss" {
|
||||
|
||||
namespace UglifyCSS {
|
||||
|
||||
interface UglifyCSSOptions {
|
||||
|
||||
/**
|
||||
* Adds a newline (approx.) every n characters; 0 means no newline and is the default value
|
||||
*/
|
||||
maxLineLen?: number
|
||||
|
||||
/**
|
||||
* eEpands variables; by default, @variables blocks are preserved and var(x)s are not expanded
|
||||
*/
|
||||
expandVars?: boolean
|
||||
|
||||
/**
|
||||
* Removes newlines within preserved comments; by default, newlines are preserved
|
||||
*/
|
||||
uglyComments?: boolean
|
||||
|
||||
/**
|
||||
* Preserves newlines within and around preserved comments
|
||||
*/
|
||||
cuteComments?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Uglify a string
|
||||
*/
|
||||
function processString(content: string, options?: UglifyCSSOptions): string;
|
||||
|
||||
/**
|
||||
* Uglify one or more files
|
||||
*/
|
||||
function processFiles(filenames: Array<string>, options?: UglifyCSSOptions): string;
|
||||
|
||||
}
|
||||
|
||||
export = UglifyCSS;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user