ngx-face-api-js
Version:
Angular directives for face detection and face recognition in the browser. It is a wrapper for face-api.js, so it is not dependent on the browser implementation.
17 lines • 754 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const schematics_1 = require("@angular-devkit/schematics");
function addBrowserIgnorePackageSetting() {
return (host, _) => {
const buf = host.read('package.json');
if (!buf) {
throw new schematics_1.SchematicsException('cannot find package.json');
}
const content = JSON.parse(buf.toString('utf-8'));
content.browser = Object.assign({}, content.browser, { fs: false, crypto: false });
host.overwrite('package.json', JSON.stringify(content, null, 2));
return host;
};
}
exports.addBrowserIgnorePackageSetting = addBrowserIgnorePackageSetting;
//# sourceMappingURL=addBrowserIgnorePackageSetting.js.map