@taiga-ui/cdk
Version:
Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance
23 lines • 1.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.runMigration = void 0;
const tslib_1 = require("tslib");
const node_path_1 = require("node:path");
const schematics_1 = require("@angular-devkit/schematics");
const testing_1 = require("@angular-devkit/schematics/testing");
const ng_morph_1 = require("ng-morph");
const collectionPath = (0, node_path_1.join)(__dirname, '../../../../migration.json');
function runMigration(before) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const host = new testing_1.UnitTestTree(new schematics_1.HostTree());
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
(0, ng_morph_1.setActiveProject)((0, ng_morph_1.createProject)(host));
(0, ng_morph_1.createSourceFile)('test/app/tokens.ts', before);
(0, ng_morph_1.createSourceFile)('package.json', '{}');
(0, ng_morph_1.saveActiveProject)();
const tree = yield runner.runSchematic('updateToV5', { 'skip-logs': process.env['TUI_CI'] === 'true' }, host);
return tree.readContent('test/app/tokens.ts');
});
}
exports.runMigration = runMigration;
//# sourceMappingURL=utils.js.map