Reputation: 223
Sencha command let you easily create, build and distribute your own package. Ext js library is built using sencha command.
I wonder what is the correct way to have the built-package to have everything in correct order, especially for a list of Singleton files that are in the root folder and there is no dependency among each other. For example, for sencha core package, there is Ext.js, ComponentQuery.js, etc., how Sencha command knows to always build Ext.js first.
This is a bit puzzling to me. I have a similar situation. I have a package, let's call it MyCoolStuff, in its root source folder, I have CoolStuff.js and a list of singleton/utility files, for example, CoolStuffEventHandler.js. I absolutely need CoolStuff.js to be built first, but so far have no luck.
How did ext js do it?
Upvotes: 1
Views: 623
Reputation: 3734
When you define your classes, no matter singletones or not, you specify dependencies using requires
and uses
directives:
Ext.define('CoolStuffEventHandler', {
////
requires: [
'CoolStuff'
],
/////
});
That's all! All the rest is taken care of by Sencha CMD for you.
Upvotes: 1