Threaded View
-
1 Oct 2012 7:07 PM #1
sencha generate theme creating config.rb with wrong css_path?
sencha generate theme creating config.rb with wrong css_path?
I wanted to play with a custom theme so I followed the instructions here...
http://docs.sencha.com/ext-js/4-1/#!.../command_theme
...to create a new theme in my generated application.
When I do the 'compass compile' command it works but the resulting app.css is incorrectly located.
Its ended up in "myapp/resources/sass/css/app.css" rather than "myapp/resources/css/mynewtheme/app.css".
Looking at the config.rb in the theme I created I can see the problem...
I'm testing this by loading the generated theme.html file in to my browser.Code:# Get the directory that this configuration file exists in dir = File.dirname(__FILE__) $ext_path = File.join(dir, '..', '..', '..', 'ext') # Load the extjs framework automatically. load File.join($ext_path, 'resources', 'themes') # Compass configurations sass_path = dir css_path = File.join(dir, "..", "css") # << This is what was generated and puts the output in the wrong location # This works >> css_path = File.join(dir, "..", "..", "css", "mynewtheme") # Require any additional compass plugins here. images_dir = File.join(dir, "..", "images") output_style = :compressed environment = :production
e.g. file:///Users/hjones/test4/resources/theme/mynewtheme/theme.html
In my app.scss I made the following simple changes...
Without the change to the config.rb file I just keep picking up the stock extjs theme.Code:$theme-name: 'gray'; $base-color: green; $window-background-color: yellow; @import 'compass'; @import 'ext4/default/all';
With the adjusted css_path my modifications show up.
I was expecting the generate theme + compass compile + test to work out of the box, i.e. not require tweaking or file moving.
Does this looks like a 'sencha generate theme' bug on the css_path in the config.rb file?
Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
in
a recent build.


Reply With Quote