import { microgrammar } from "@atomist/microgrammar" ; import { FileMatchData , microgrammarMatchAspect , } from "@atomist/sdm-pack-aspect" ; import { Aspect } from "@atomist/sdm-pack-fingerprint" ; const targetFrameworksGrammar = microgrammar ( { _open : /<TargetFrameworks?>/ , targetFramework : /[a-zA-Z0-9_;/.]+/ , _close : /<\/TargetFrameworks?>/ , } ) ; type { Aspect < FP < FileMatchData > > } export const CsProjectTargetFrameworks = microgrammarMatchAspect ( { name : "csproject-targetframeworks" , displayName : "CSProject TargetFrameworks" , glob : "*.csproj" , grammar : targetFrameworksGrammar , path : "targetFramework" , toDisplayableFingerprint : fp => fp . data . matches . length === 0 ? "None" : fp . data . matches [ 0 ] . matchValue , } ) ;