Results 1 to 6 of 6

Thread: sencha command and deftjs to build project

  1. #1
    Sencha User
    Join Date
    Dec 2012
    Location
    hyderabad
    Posts
    91
    Answers
    1
    Vote Rating
    0
      0  

    Default sencha command and deftjs to build project

    hi every one ,

    how to generate deftjs project using sencha command . i want to use deftjs in my project . i am generation extjs project using sencha cammand. but i am using detjs in my project so how to generate or adapt deftjs to sencha command used to generate project.

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505
    Vote Rating
    255
      0  

    Default

    You're linking to the deftjs library js file from your index.html (or whatever the launch page is) currently, yes?

  3. #3
    Sencha User
    Join Date
    Dec 2012
    Location
    hyderabad
    Posts
    91
    Answers
    1
    Vote Rating
    0
      0  

    Default

    thanks for replying slemmon.
    where to i am include deftjs library in sencha command generated project .
    here i am providing sencha command Generated Project structure.
    1)    i want to include deftjs library in that project . ( i am include that files in index.html later)
    2) if i am build project with sencha command ,the library include in generated projectextjs project structure.jpg

  4. #4
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505
    Vote Rating
    255
      0  

    Default

    In your index page do you see something like this:

    Code:
    <!-- <x-compile> -->
        <!-- <x-bootstrap> -->
            <link rel="stylesheet" href="bootstrap.css">
            <script src="../ext/ext-dev.js"></script>
            <script src="bootstrap.js"></script>
        <!-- </x-bootstrap> -->
        <script src="app.js"></script>
    <!-- </x-compile> -->
    You should be able to link to another library (it will need to be local relative to the index page - can't link to another file system, url, etc) inside of the x-compile tags. Try linking to it right above the x-bootstrap tag up top and see if that compiles out in your all-classes.js file as expected.

  5. #5
    Sencha User
    Join Date
    Dec 2012
    Location
    hyderabad
    Posts
    91
    Answers
    1
    Vote Rating
    0
      0  

    Default

    thank you for replaying ,

    it s gives error :[
    [ERR] Failed to resolve dependency Deft.mvc.Application for file DeftjsApp.view. Application
    [ERR] Error executing page compilation Unknown definition for dependency : Deft.
    mvc.Application
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExBuild: com.sencha.exceptions.ExNotFound: Unknown d
    efinition for dependency : Deft.mvc.Application

    ].

    my code is like this.

    index.html

    <!DOCTYPE HTML><html>
    <head>
    <meta charset="UTF-8">
    <title>DeftjsApp</title>
    <link rel="stylesheet" href="resources/default/app.css">
    <!-- <x-compile> -->
    <script type="text/javascript" src="deft.js"></script>
    <!--<script type="text/javascript" src="deft/deft-debug.js"></script> -->// here deft is there in projectname -->app-->deft
    <!--<script type="text/javascript" src="deft/deft.js"></script> -->
    <script type="text/javascript" src="app/app-loader.js"></script>
    <!-- <x-bootstrap> -->
    <script src="../../../ext/ext-dev.js"></script>
    <script src="bootstrap.js"></script>
    <!-- </x-bootstrap> -->
    <script src="app.js"></script>
    <!-- </x-compile> -->
    </head>
    <body></body>
    </html>


    app.js


    Ext.Loader.setConfig({
    enabled:true,
    disableCaching: false,
    });
    Ext.syncRequire(["DeftjsApp.view.Application"]);


    Ext.create("DeftjsApp.view.Application");


    Application.js

    // Generated by CoffeeScript 1.4.0
    /**
    * DeftJS Application class for the Phoenix application.
    */


    Ext.define("DeftjsApp.view.Application", {
    extend: "Deft.mvc.Application",
    requires: [ "DeftjsApp.view.Viewport","DeftjsApp.store.TreePanelStore"],

    init: function() {
    this.beforeInit();
    Deft.Injector.configure({
    testStore:'DeftjsApp.store.TreePanelStore',
    });
    Deft.promise.Deferred.enableLogging = false;
    return this.afterInit();
    },
    beforeInit: function() {},

    afterInit: function() {
    Ext.tip.QuickTipManager.init();
    return Ext.create("DeftjsApp.view.Viewport");
    }
    });

    viewport.js
    Ext.define('DeftjsApp.view.Viewport', { extend: 'Ext.container.Viewport',
    requires:[
    'Ext.tab.Panel',
    'Ext.layout.container.Border',
    'DeftjsApp.view.DashBoard'
    ],


    layout: {
    type: 'border'
    },


    items: [{
    region: 'west',
    xtype: 'panel',
    title: 'west',
    width: 150
    },{
    region: 'center',
    xtype: 'tabpanel',
    items:[{
    title: 'Dashboard',
    xtype:'dashboard'
    }]
    }]
    });




    app-loader.js
    // Generated by CoffeeScript 1.4.0


    Ext.Loader.setConfig({
    enabled: true,
    paths: {
    "DeftjsApp": "app"
    }
    });


    Ext.syncRequire(["Ext.Component", "Ext.ComponentManager", "Ext.ComponentQuery"]);


    the problem is i am try to build project with sencha command . it gives above error.
    and i am linking deftjs (deft.js and deft-debug.js in app->Deft(new folder), in project ->Deft(new folder)) i am trying in index.html. but no use.

    please help me

  6. #6
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505
    Vote Rating
    255
      0  

    Default

    What if you put app-loader.js just above your app.js link in your index page?

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
  •