Results 1 to 6 of 6

Thread: Build both desktop and phone for universal app?

  1. #1

    Join Date
    Nov 2010
    Location
    Canton, GA, USA
    Posts
    190

    Default Build both desktop and phone for universal app?

    I'm not new to ExtJS but I haven't build a universal app before so I'm tinkering with doing so using the recent 7-EA release. I used the "universalmodern" template so the resulting package.json has scripts entries for "build:desktop" and "build:phone" and the index.html has logic to set Ext.manifest to point to generatedFiles/desktop or generatedFiles/phone.

    However, when I run either of those builds, build/production/MyApp ony has the one version of the app. I expected there to be a way to build both and deploy them together.

    What am I missing? Do I have to combine them myself?
    Last edited by pauldugas; 1 Aug 2019 at 3:19 PM. Reason: typo

  2. #2
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    569

    Default

    Hello Paul,

    No there is no need to combine it by yourself, because it is already combined. Based on the desktop or phone it will switch to the corresponding build.
    You can build the universal app like any other app created on extjs or by command "sencha app build".


    For more details please see the below documentation.
    https://docs.sencha.com/extjs/6.0.0/...d_smart_phones


    Regards,
    Kumar
    Sencha Support.

  3. #3

    Join Date
    Nov 2010
    Location
    Canton, GA, USA
    Posts
    190

    Default

    Got it. What are the "dev:*" and "build:*" scripts in package.json for then? I was running those, not the sencha tool.

  4. #4
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    569

    Default

    Hello Paul,

    Thank you for contacting Sencha Support!

    I request you to provide some more details along with the package.json file to assist you in a better way.

    Regards,
    Kumar
    Sencha Support.

  5. #5

    Join Date
    Nov 2010
    Location
    Canton, GA, USA
    Posts
    190

    Default

    Apologies for resurrecting a dead thread but I started it so...

    Running "sencha app build" in the project directory does build the combined desktop/phone webapp as expected however, running "npm run build" does not. Is there a way to build the combined app using npm only? I'm wondering because I'm trying to get a GitLab CI/CD script setup to build and deploy the webapp and would like to avoid having to install Cmd if possible.

    I'm now working with the 7.0.0-CE release of ExtJS and Cmd. The generated package.json file has the "scripts" entry below. I suspect there's a way to run webpack twice to achieve what I'm after but am looking for some guidance.

    "build": "npm run clean && cross-env webpack --env.profile=desktop --env.environment=production --env.treeshake=yes"

  6. #6

    Join Date
    Nov 2010
    Location
    Canton, GA, USA
    Posts
    190

    Default

    Looks like removing the --env.profile=desktop option from the webpack command is the key. <fingers-crossed/>

Posting Permissions

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