我找不到如何使用target
这是我的结构:
string source = "1.2.3.0.4.5.7"; // actual version
string target = "1.2.3.0.3.9.75"; // minimum accepted version
if (CompareVersions(source, target) >= 0) {
// source is at least target, i.e. source >= target
}
我想在ng g workspace-schematic <schematic-name>
中使用|- tools/
|- schematics
|- my-first-schematic
|- my-second-schematic
。
我了解my-first-schematic
,但是当我们想从另一个集合中调用schematif时,它很有用。
谢谢!
答案 0 :(得分:0)
我们可以直接将 my-first-schematic 导入 my-second-schematic ,然后将其简单地链接起来。 例如
tools / schematics / my-first-schematics / index.ts
export default function(schema: any): Rule {
console.log('my-first-schematics');
}
tools / schematics / my-second-schematic / index.ts
import myFirstSchematics from '../my-first-schematics';
export default function(schema: any): Rule {
console.log('my-second-schematic');
...
return chain([
myFirstSchematics(schema),
...
]);
}