extjsextjs5sencha-cmdsencha-cmd5

How do I copy ExtJS 5 examples with sencha cmd?


I want to make a web app that is very similar to the extj5 portal example: http://dev.sencha.com/extjs/5.0.0/examples/portal/index.html

I would like to copy it to a different directory and start coding.

Here are the steps I am taking:

1) Copy portal directory to my working directory.

2) Cd into portal

3) Run the following on the command line.

sencha app upgrade ext-5.0.0 // Ext 5 and this app should be in the same directory

But when I do so, I get:

$ sencha app upgrade ext-5.0.0
Sencha Cmd v5.0.2.270
[WRN] Did not locate framework package
[WRN] Failed to resolve package ext-theme-neptune
[WRN] Failed to resolve package sencha-charts
[ERR] Theme "ext-theme-neptune" not found
[ERR] Required package "ext-theme-neptune" not found

Any advice on the proper way to do this? Ruby is properly installed and I was able to successfully go through the extjs 5 tutorial (generate app, watch app, etc.)


Solution

  • Sencha Cmd uses a lot of metadata, so your best bet is to generate a brand-new app in a blank folder first. Delete everything EXCEPT the /.sencha/ folder.

    Then copy/paste the portal example (everything EXCEPT the /.sencha/ folder) into your new app.

    You will also need to copy the /examples/ux/ folder, and then update the app.json file -- pointing classpath to the correct ux folder.


    Normally this process would be easier, but the Ext JS download is essentially a "workspace", so copying one of the examples into a new place will miss a lot of the workspace's assumed structure (namely, the framework!)