import camelCase from 'camelcase' ; import { packages } from '../packagesTs' ; export interface PackageItem { name : string ; dest : string ; } function generatePackageList ( rawArray ) { const resultArray = [ ] ; for ( const item of rawArray ) { const name = camelCase ( item ) . replace ( 'har' , 'Har' ) . replace ( 'Core' , 'Js' ) ; const dest = item ; resultArray . push ( { name , dest } ) ; } return resultArray ; } export const packageList = generatePackageList ( packages ) ;