src/artifact_listing.js
function defaultAssets( { name, category, descriptor } ) {
   switch( category ) {
      case 'themes':
         return {
            assetUrls: [ descriptor.styleSource || 'css/theme.css' ]
         };
      case 'layouts':
      case 'widgets':
      case 'controls':
         return {
            assetsForTheme: [ descriptor.templateSource || `${name}.html` ],
            assetUrlsForTheme: [ descriptor.styleSource || `css/${name}.css` ]
         };
      default:
         return {};
   }
}
function defaultAssets( { name, category, descriptor } ) {
   switch( category ) {
      case 'themes':
         return {
            assetUrls: [ descriptor.styleSource || 'css/theme.css' ]
         };
      case 'layouts':
      case 'widgets':
      case 'controls':
         return {
            assetsForTheme: [ descriptor.templateSource || `${name}.html` ],
            assetUrlsForTheme: [ descriptor.styleSource || `css/${name}.css` ]
         };
      default:
         return {};
   }
}
function defaultAssets ( { name , category , descriptor } ) { switch ( category ) { case 'themes' : return { assetUrls : [ descriptor . styleSource || 'css/theme.css' ] } ; case 'layouts' : case 'widgets' : case 'controls' : return { assetsForTheme : [ descriptor . templateSource || ` ${ name } ` ] , assetUrlsForTheme : [ descriptor . styleSource || ` ${ name } ` ] } ; default : return { } ; } }
Return the default assets for the given artifact, determined by it's type
and descriptor's `styleSource` and `templateSource` attributes.
@param {Object} artifact an artifact created by the {@link ArtifactCollector}
@return {Object} a partial descriptor containing the artifact's default assets
Return the default assets for the given artifact determined by it s type and descriptor s styleSource and templateSource attributes .