ng2-charts-schematics
Version:
ng2-charts schematics collection for generating chart components
15 lines • 698 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const schematics_1 = require("@angular-devkit/schematics");
const ts = require("typescript");
// import { ReplaceChange } from '@schematics/angular/utility/change';
function readIntoSourceFile(host, modulePath) {
const text = host.read(modulePath);
if (text === null) {
throw new schematics_1.SchematicsException(`File ${modulePath} does not exist.`);
}
const sourceText = text.toString('utf-8');
return ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true);
}
exports.readIntoSourceFile = readIntoSourceFile;
//# sourceMappingURL=read-into-source-file.js.map