scripts/generateAssetsClass.js
/**
 * generate asset information object for class export 
 * @param { string } name file name
 * @param { Array<string> } extensions file extensions
 */
generate asset information object for class export
@param { string } name file name
@param { Array } extensions file extensions
generate asset information object for class export @param { string } name file name @param { Array } extensions file extensions
function generateAssetClassDefinition(assetName, extensions) {
  const className = toPascalCase(assetName.split('/'));
  const type = decideAssetType(assetName, extensions);
  return {
    type,
    assetName,
    className,
    ...generateAssetFileDefinition(assetName, extensions),
    ...generateAssetOptions(type, assetName, extensions),
  };
}
function generateAssetClassDefinition ( assetName , extensions ) { const className = toPascalCase ( assetName . split ( '/' ) ) ; const type = decideAssetType ( assetName , extensions ) ; return { type , assetName , className , ... generateAssetFileDefinition ( assetName , extensions ) , ... generateAssetOptions ( type , assetName , extensions ) , } ; }
generate asset information object for class export
 @param { string } name file name
 @param { Array<string> } extensions file extensions
generate asset information object for class export @param { string } name file name @param { Array<string > } extensions file extensions