code: def discover_static_files(base_path, sub_path=''):
      
      js_files = discover_files(base_path, sub_path=sub_path,
                                ext='.js', trim_base_path=True)
      sources, mocks, specs = sort_js_files(js_files)
      html_files = discover_files(base_path, sub_path=sub_path,
                                  ext='.html', trim_base_path=True)
  
      p = path.join(base_path, sub_path)
      _log(sources, 'JavaScript source', p)
      _log(mocks, 'JavaScript mock', p)
      _log(specs, 'JavaScript spec', p)
      _log(html_files, 'HTML template', p)
  
      return sources, mocks, specs, html_files
docs: Discovers static files in given paths.
  
      It returns JavaScript sources, mocks, specs and HTML templates,
      all grouped in lists.