Vue-styleguidist: Themes with names consisting of two words don't work

Created on 2 Jul 2019  路  3Comments  路  Source: vue-styleguidist/vue-styleguidist

The way rsg-codemirror-theme.css is generated, themes with names different from the .css files don't work. This error is raised:

Module not found: Can't resolve 'rsg-codemirror-theme.css' in '/home/dhruvkb/Documents/gsoc/cc-vocabulary/node_modules/vue-styleguidist/lib/rsg-components/VsgEditor'

For example, the theme solarized dark (notice the absence of a dash) is loaded from the file solarized.css.

To reproduce, just set

editorConfig: {
  theme: 'solarized dark'
}

To resolve this, as far as I know, the theme .css file should be generated using the word before the space in the theme name.

Since there is only one theme in the present CodeMirror collection that has this discrepancy (Solarized) so you might be inclined to dismiss this issue, but _please don't_.

bug

All 3 comments

I would add one remark though, as of vsg 4, codemirror is probably going to be deprecated in favor of prism way lighter and easier to configure.
You can already use prism using the simpleEditor option

Hello @dhruvkb

Here is a comprehensive list of the css theme files embedded in codemirror by default and supported by vue-styleguidist:

To obtain it I went to https://github.com/codemirror/CodeMirror/tree/master/theme

 3024-day                                
 3024-night                              
 abcdef                                  
 ambiance-mobile                         
 ambiance                                
 base16-dark                             
 base16-light                            
 bespin                                  
 blackboard                              
 cobalt                                  
 colorforth                              
 darcula                                 
 dracula                                 
 duotone-dark                            
 duotone-light                           
 eclipse                                 
 elegant                                 
 erlang-dark                             
 gruvbox-dark                            
 hopscotch                               
 icecoder                                
 idea                                    
 isotope                                 
 lesser-dark                             
 liquibyte                                  
 lucario                                 
 material                                
 mbo                                     
 mdn-like                                
 midnight                                
 monokai                                 
 neat                                    
 neo                                     
 night                                   
 nord                                    
 oceanic-next                            
 panda-syntax                            
 paraiso-dark                            
 paraiso-light                           
 pastel-on-dark                          
 railscasts                              
 rubyblue                                
 seti                                    
 shadowfox                               
 solarized                               
 ssms                                    
 the-matrix                              
 tomorrow-night-bright                   
 tomorrow-night-eighties                 
 ttcn                                    
 twilight                                
 vibrant-ink                             
 xq-dark                                 
 xq-light                                
 yeti                                    
 yonce                                   
 zenburn

Where did you find the themes name? Did it come from a 3rd party?

Actually found it on their site. Both themes are stored in the same css file. I fixed it !!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rafegoldberg picture rafegoldberg  路  7Comments

steriley picture steriley  路  7Comments

AlexQwerty picture AlexQwerty  路  5Comments

simonwjackson picture simonwjackson  路  3Comments

elevatebart picture elevatebart  路  4Comments