PDA

View Full Version : 'ext-gen' does not work with multi-app workspaces



aanders
9 Jul 2018, 1:12 PM
How can I make the new "Open Tooling" work with multi-app workspaces?

Assume that I run the following commands to create a new workspace and one application in it:

sencha generate workspace TestWorkspace
cd TestWorkspace
sencha -sdk /path/to/ext-6.6.0 generate app SenchaCmdApp SenchaCmdApp

If I then run "ext-gen upgrade" in the workspace folder, I get the error
no such file or directory, open 'app.json'
If I instead run "ext-gen upgrade" in the SenchaCmdApp application folder, I get the error
no such file or directory, lstat 'workspace.json'

From these error codes and from looking at the code for "ext-gen upgrade", it appears that "ext-gen upgrade" is not designed to handle multi-app workspaces.

I also tried to manually do the steps "ext-gen upgrade" was not able to perform and then run
npm install
npm start

Which results in
Error: ENOENT: no such file or directory, scandir './packages'

Have I missed some documentation for using "Open Tooling" with multi-app workspaces? And when/how can I replace the use of "Sencha Cmd Packages" with npm packages?

Maurice.Rossi
6 Aug 2018, 1:58 AM
Same problem here. Did you solve this?

Best regards
Maurice

aanders
7 Aug 2018, 12:51 AM
Same problem here. Did you solve this?

Best regards
Maurice

Hi Maurice,

Nope, I'm not able to get the "Open Tooling" to work with my setup (Sencha workspace containing ExtJS app folder and package folder). After looking at the ext-gen and ext-build node modules, I don't believe that Sencha expected that to work either. But I did expect Sencha to acknowledge that this is a limitation/bug in the current version (as they did with the other ext-gen issue I reported).

Even if Sencha has not labeled it as such now, I think you should consider the current "Open Tooling" support as "early access" (as it was originally labeled in this roadmap: https://www.sencha.com/blog/sencha-product-roadmap-update/).

wemerson.januario
10 Nov 2018, 3:10 AM
any update Sencha?

mgusmano
14 Nov 2018, 6:13 AM
We did not implement multi-app workspaces in the first version of ext-gen, but we are looking on what is needed to implement it now

wemerson.januario
14 Nov 2018, 8:31 AM
We did not implement multi-app workspaces in the first version of ext-gen, but we are looking on what is needed to implement it now

Thank you Marc.

mgusmano
14 Nov 2018, 9:38 AM
you are welcome

klodoma1
27 May 2019, 12:32 PM
Is there a guideline or some ideas on "how" npm tooling should be used in a multi-app environment?

Practically, one has a structure like:

- senchaWorkspace
- app1
- app2
- ext
- packages
- local
- package1
- package2
- package3
- theme1
- theme2
- theApp





How can apps share the same packages with the npm tooling?
I assume a package.json will be in the workspace directly, how about the package.json that are in the apps? Those contains code that are application specific

wemerson.januario
9 Oct 2019, 8:18 PM
I guess you can aproach on multi app scenario using universal application template as a profile and change classpath to , where build.id is your app profile




"classpath": [
"app/shared/src",
"app/${build.id}/src"
],

klodoma1
10 Oct 2019, 11:08 PM
I ended up with 2 versions so far:

1. changing ext-webpack-plugin provided by sencha so that it works with multi-app workspace(nodejs packages are installed in the workspace folder and not in the application folder)
2. working the "old" way with sencha watch and not webpack-dev-server

Currently I still tend to use the "old" way, but maybe I'll review the whole setup once I find some time.

wemerson.januario
11 Oct 2019, 3:08 AM
Can you share changes made?

klodoma1
11 Oct 2019, 1:38 PM
Can you share changes made?
Yes I can, but please be patient a few good days. I don't have it all in a share-able format, but I will create a github repo where i throw everything in.