Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
package-lock.json
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.16",
"description": "An exceptionally fast, thorough and tiny unused-CSS cleaner",
"main": "./dist/dropcss.cjs.js",
"types": "./src/types.d.ts",
Comment thread
ghostdevv marked this conversation as resolved.
"scripts": {
"build": "rollup -c",
"test": "nyc mocha test/src/*.js",
Expand Down
11 changes: 11 additions & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export interface DropcssOptions {
html: string;
css: string;

shouldDrop?: (selector: string) => boolean;
didRetain?: (selector: string) => void;

keepText?: boolean;
Comment thread
ghostdevv marked this conversation as resolved.
Outdated
}

export default function dropcss(options: DropcssOptions): { css: string };