Skip to content

Commit f6ecd8d

Browse files
authored
fix(css): Add index.js (#10)
1 parent 613de7d commit f6ecd8d

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Built files
22
*.js
3+
!index.js
34
!binding.js
45
*.map
56
*.d.ts

packages/css/lib/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.minify = void 0;
4+
const binding = require("./binding");
5+
async function minify(content, options) {
6+
return binding.minify(content, toBuffer(options));
7+
}
8+
exports.minify = minify;
9+
function toBuffer(t) {
10+
return Buffer.from(JSON.stringify(t));
11+
}

packages/html/lib/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.minify = void 0;
4+
const binding = require("./binding");
5+
async function minify(content, options) {
6+
return binding.minify(content, toBuffer(options));
7+
}
8+
exports.minify = minify;
9+
function toBuffer(t) {
10+
return Buffer.from(JSON.stringify(t));
11+
}

0 commit comments

Comments
 (0)