import { Processor , Document } from 'dgeni' ; export class PackagesProcessor implements Processor { name = 'packages' ; $runBefore = [ 'computing-ids' ] ; docTypes = [ ] ; $process ( docs ) { return docs . map ( doc => { if ( doc . docType === 'module' ) { doc . id = doc . id . replace ( /\/src$/ , '' ) . replace ( /^.*libs\// , '' ) ; doc . docType = 'package' ; doc . name = `@daffodil/${ doc . id }` ; } return doc ; } ) ; } } ;