minify-html/nodejs/buildnative.js

19 lines
323 B
JavaScript
Raw Normal View History

2021-04-05 23:43:55 -04:00
const cp = require("child_process");
2021-04-06 00:12:51 -04:00
const path = require("path");
2021-04-05 23:43:55 -04:00
const pkg = require("./package.json");
cp.spawnSync(
"cargo",
[
"build",
"--manifest-path",
2021-04-06 00:12:51 -04:00
path.join(__dirname, "native", "Cargo.toml"),
2021-04-05 23:43:55 -04:00
"--release",
"--features",
pkg.name.split("/")[1],
],
{
stdio: "inherit",
}
);