You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
574 B
22 lines
574 B
// tslint:disable-next-line: no-implicit-dependencies
|
|
import camelCase from 'camelcase';
|
|
import {packages} from '../packagesTs';
|
|
|
|
export interface PackageItem {
|
|
name: string;
|
|
dest: string;
|
|
}
|
|
|
|
function generatePackageList(rawArray: string[]): PackageItem[] {
|
|
const resultArray: PackageItem[] = [];
|
|
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);
|
|
|