Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Sencha cmd 5 wrong build work

  1. #1
    Sencha User
    Join Date
    Oct 2014
    Location
    Russia
    Posts
    15

    Default Sencha cmd 5 wrong build work

    Hi.
    I download latest stable version of sencha cmd (at moment Sencha Cmd v5.1.2.52)
    Then I create app using following commands:
    1) sencha generate app -ext GdApp ./app
    2) sencha app build (in app directory)
    3) Add following lines to my index.html file:

    PHP Code:
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <?= $this->headLink()->prependStylesheet($this->basePath() . '/js/app/build/production/GdApp/resources/GdApp-all.css'); ?>
        <!-- Scripts -->

        <script>
            //sencha cmd bug
            var Ext = window.Ext || {}; Ext.Boot={};
            Ext.platformTags = Ext.platformTags || {};
        </script>
        <?php
        $this
    ->headScript()->appendFile($this->basePath() . '/js/app/build/production/GdApp/app.js');
        
    $this->headScript()->appendFile($this->basePath() . '/js/app/ext/packages/ext-locale/build/ext-locale-ru.js');

        echo 
    $this->headScript();
        
    ?>

    </head>
    After all that's doesn't work correctly. In my app.json file defined theme:

    Code:
    "extend": "ext-theme-crisp",
    But I get classic:
    qegagdg.png

    What I'm doing wrong, And why I need to define some likes Ext = window.Ext || {}? It's bug?

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Here's the <head> section of the default index.html which 5.1.2 generated for me:
    Code:
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta charset="UTF-8">
    
    
        <title>GdApp</title>
    
    
        <!-- The line below must be kept intact for Sencha Cmd to build your application -->
        <script id="microloader" type="text/javascript" src="bootstrap.js"></script>
    
    
    </head>
    Does it work if you add the bootstrap line back in?

  3. #3
    Sencha User
    Join Date
    Oct 2014
    Location
    Russia
    Posts
    15

    Default

    Quote Originally Posted by Gary Schlosberg View Post
    Does it work if you add the bootstrap line back in?
    Build has no bootstrap.js, but it generates index.html with big js code inside. In ExtJS 4 I can simply add styles and "project-all.js" and it works fine!

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    I'm not seeing where your app is getting access the Ext JS framework. And are you saying that the build doesn't generate the microloader line in your index.html, or that the build doesn't generate a bootstrap.js file?

  5. #5
    Sencha User
    Join Date
    Oct 2014
    Location
    Russia
    Posts
    15

    Default

    Quote Originally Posted by Gary Schlosberg View Post
    I'm not seeing where your app is getting access the Ext JS framework. And are you saying that the build doesn't generate the microloader line in your index.html, or that the build doesn't generate a bootstrap.js file?
    Both!
    My project structure:

    /js/ext - downloaded framework.

    /js/app - application folder

    After first failed build I try create app with same command:
    sencha -sdk /js/ext generate app Gdru /js/app





    With access directly all works when I type http://localhost/js/app
    I build application in /js/app folder with command
    sencha app build production

    In print output I see some likes that:
    Code:
    C:\wamp\www\public\js\app>sencha app build production
    Sencha Cmd v5.1.2.52
    [INF] Processing Build Descriptor : default
    [INF] Using GPL Version of Ext JS version 5.1.0.107 from C:\wamp\www\public\js\app\ext.
    [INF] The implications of using GPL version can be found here (http://www.sencha.com/products/extjs/licensing).
    [INF] Loading app json manifest...
    [INF] Appending content to C:\wamp\www\public\js\app/bootstrap.js
    [INF] Writing content to C:\wamp\www\public\js\app/bootstrap.json
    [INF] Compressing data with YuiJavascriptCompressor
    [INF] merging 224 input resources into C:\wamp\www\public\js\app\build\production\Gdru\resources
    [INF] merged 0 resources into C:\wamp\www\public\js\app\build\production\Gdru\resources
    [INF] merging 0 input resources into C:\wamp\www\public\js\app\build\production\Gdru
    [INF] merged 0 resources into C:\wamp\www\public\js\app\build\production\Gdru
    [INF] writing sass content to C:\wamp\www\public\js\app/build/temp/production/Gdru/sass/Gdru-all.scss.tmp
    [INF] appending sass content to C:\wamp\www\public\js\app/build/temp/production/Gdru/sass/Gdru-all.scss.tmp
    [INF] appending sass content to C:\wamp\www\public\js\app/build/temp/production/Gdru/sass/Gdru-all.scss.tmp
    [INF] executing compass using system installed ruby runtime
    overwrite Gdru-all.css
    [INF] writing sass content to C:\wamp\www\public\js\app/build/temp/production/Gdru/slicer-temp/Gdru-example.scss.tmp
    [INF] executing compass using system installed ruby runtime
    identical Gdru-example.css
    [INF] Writing content to C:\wamp\www\public\js\app/sass/example/bootstrap.json
    [INF] Writing content to C:\wamp\www\public\js\app/sass/example/bootstrap.js
    [INF] Capturing theme image
    [INF] Capture complete
    [INF] Slicing images...
    [INF] Slicing complete - generated 266 images
    [INF] Copying page resources to C:\wamp\www\public\js\app\build\production\Gdru
    [INF] Writing content to C:\wamp\www\public\js\app/build/production/Gdru/app.json
    [INF] Writing content to C:\wamp\www\public\js\app/build/production/Gdru/microloader.js
    [INF] Appending content to C:\wamp\www\public\js\app/build/production/Gdru/microloader.js
    [INF] Building output markup to C:\wamp\www\public\js\app/build/production/Gdru/index.html
    [INF] Writing content to C:\wamp\www\public\js\app/build/production/Gdru/index.html
    But no files about microloader or some other else.

  6. #6
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Which version of Windows is this?

  7. #7
    Sencha User
    Join Date
    Oct 2014
    Location
    Russia
    Posts
    15

    Default

    Quote Originally Posted by Gary Schlosberg View Post
    Which version of Windows is this?
    Windows 8.1 Pro

  8. #8
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Does the app build properly before you make your changes to the index.html file?

  9. #9
    Sencha User
    Join Date
    Oct 2014
    Location
    Russia
    Posts
    15

    Default

    Quote Originally Posted by Gary Schlosberg View Post
    Does the app build properly before you make your changes to the index.html file?
    No. I don't make changes in the index.html. After build I add css and js files to my html file, because I need that on another route.

  10. #10
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    I thought you were changing the index.html file:
    Quote Originally Posted by mdsina View Post
    3) Add following lines to my index.html file:

Page 1 of 2 12 LastLast

Similar Threads

  1. build app can't work (Sencha Cmd v5.0.3.324)
    By baberson in forum Sencha Cmd
    Replies: 1
    Last Post: 19 Nov 2014, 2:16 PM
  2. erorr on sencha build -p app.jsb3 -d (js wrong path)
    By sophicworks in forum Sencha Cmd
    Replies: 2
    Last Post: 18 May 2013, 1:12 AM
  3. [ST2] sencha app build production - Can't get it to work with v3.x
    By hotdp in forum Sencha Architect 2.x: Help & Discussions
    Replies: 3
    Last Post: 18 Jan 2013, 11:54 AM
  4. sencha app build production does not work
    By likesencha-dl in forum Sencha Cmd
    Replies: 5
    Last Post: 27 Jul 2012, 6:12 AM
  5. Replies: 3
    Last Post: 19 Jun 2012, 3:15 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •