@ngneat/transloco
Version:
The internationalization (i18n) library for Angular
21 lines • 881 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const schematics_1 = require("@angular-devkit/schematics");
const internal_compatibility_1 = require("rxjs/internal-compatibility");
const operators_1 = require("rxjs/operators");
const ngx_translate_migration_1 = require("./ngx-translate-migration");
function default_1(options) {
return tree => {
if (!options.path) {
throw new schematics_1.SchematicsException(`
Please specify the root source of your project.
(e.g. --path ./src/app)
`);
}
return options.from === 'Angular'
? schematics_1.schematic('ng-migrate', options)
: internal_compatibility_1.fromPromise(ngx_translate_migration_1.run(options.path)).pipe(operators_1.map(() => tree));
};
}
exports.default = default_1;
//# sourceMappingURL=index.js.map