Skip to content

Commit

Permalink
fix(css): Add index.js (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
yisibl authored Sep 22, 2022
1 parent 613de7d commit f6ecd8d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Built files
*.js
!index.js
!binding.js
*.map
*.d.ts
Expand Down
11 changes: 11 additions & 0 deletions packages/css/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.minify = void 0;
const binding = require("./binding");
async function minify(content, options) {
return binding.minify(content, toBuffer(options));
}
exports.minify = minify;
function toBuffer(t) {
return Buffer.from(JSON.stringify(t));
}
11 changes: 11 additions & 0 deletions packages/html/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.minify = void 0;
const binding = require("./binding");
async function minify(content, options) {
return binding.minify(content, toBuffer(options));
}
exports.minify = minify;
function toBuffer(t) {
return Buffer.from(JSON.stringify(t));
}

0 comments on commit f6ecd8d

Please sign in to comment.