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.
  1. #1
    Ext JS Premium Member
    Join Date
    Oct 2009
    Location
    Melrose, MA
    Posts
    48
    Vote Rating
    3
    hjones is on a distinguished road

      0  

    Default 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...

    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
    I'm testing this by loading the generated theme.html file in to my browser.
    e.g. file:///Users/hjones/test4/resources/theme/mynewtheme/theme.html

    In my app.scss I made the following simple changes...

    Code:
    $theme-name: 'gray';
    $base-color: green;
    
    $window-background-color: yellow;
    
    @import 'compass';
    @import 'ext4/default/all';
    Without the change to the config.rb file I just keep picking up the stock extjs theme.
    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?

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,387
    Vote Rating
    139
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    Yes this is a bug. We are tracking this here http://www.sencha.com/forum/showthre...ence-to-images

    Unless you feel this is a different issue...
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2012
    Location
    Boston, MA
    Posts
    44
    Vote Rating
    3
    chrisfarrell is on a distinguished road

      0  

    Default Seems like a different issue

    Seems like a different issue


    This report seems to be slightly different from the bug being tracked, but maybe related?

    I have just generated a new theme (with Cmd build 181) and can confirm that the generated config.rb file does not have the correct value for 'css_path'.

  4. #4
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,387
    Vote Rating
    139
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    This should be fixed in 3.0.0.190 - http://www.sencha.com/forum/showthre...ha-Cmd-V3-Beta
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  5. #5
    Ext JS Premium Member
    Join Date
    Oct 2009
    Location
    Melrose, MA
    Posts
    48
    Vote Rating
    3
    hjones is on a distinguished road

      0  

    Default


    Yup...looking good in 190. Thanks....big improvement over earlier builds.

Thread Participants: 2

Tags for this Thread