Cripto
Cripto

Reputation: 3751

Use a common file to import ExtJS lib

I am using Sencha Architect to make a few web apps. After each build I am presented with an 'app.js' among other files. The 'app.js' of each build has 90% of its content in common with another app.

Is there a way to extract that information and leave it in a common directory on the app server to then be imported dynamically?

  1. This would allow this large file to be cached by the server and browsers.
  2. The load time of each app will decrease.
  3. I will use less space on my server.

Upvotes: 0

Views: 738

Answers (1)

arthurakay
arthurakay

Reputation: 5651

Yes... however this is far easier to accomplish without Sencha Architect.

Sencha Cmd has long had the concept of packages, and these are exactly the sort of thing you're asking for.

Sencha Architect does have the concepts of app templates as well as extensions -- but they don't really give you the single cached JS file that you're looking for.

Sencha Cmd also has some deep utilities for manually compiling a shared resource, but honestly the "package" is ultimately what you'd want. Sadly I don't know how compatible they are with Architect.

Upvotes: 1

Related Questions