@coon-js/extjs-package-loader

Ext JS Dynamic Package Loader

Usage no npm install needed!

<script type="module">
  import coonJsExtjsPackageLoader from 'https://cdn.skypack.dev/@coon-js/extjs-package-loader';
</script>

README

@coon-js/extjs-package-loader npm version

This npm-package provides access to Ext.Package in an NPM environment. It contais the original/forked package loader from sencha with an additional package.json to make sure it can be identified as a npm-package.

Installation

Using npm:

$ npm i --save-dev @coon-js/extjs-package-loader

Usage

Ext.Loader

When you're in the need of this package, you're most likely working in an environment where Ext.Package is not available. If you have access to the Ext.Loader-configuration, you can configure it with the following paths:

Ext.Loader.setPath("Ext.Package", "./node_modules/@coon-js/extjs-package-loader/packages/package-loader/src/Package.js");
Ext.Loader.setPath("Ext.package", "./node_modules/@coon-js/extjs-package-loader/packages/package-loader/src/package");

Build

The following will create a build-folder inside the root-folder of this package and place a package-loader.js and package-loader-debug.js into it:

$ npm run build 

Further information related to dynamic package loading can be found here: https://github.com/sencha/package-loader

package-loader

Ext JS Dynamic Package Loader

Requirements

This package is used by Ext JS applications and Sencha Cmd 6.5

  • Install Sencha Cmd
  • Download Sencha Ext JS. We recommend extracting Ext JS into a "sencha-sdks" folder in your home directory.

Use In Cmd Application

Simply add package-loader to the 'app.json' file's requires array:

"requires": [
    "package-loader"
]

Then build the application

sencha app build --dev

The package-loader package will be automatically downloaded from Sencha's CDN.

Manual Installation

In most cases you won't need to manually install this package. If you cannot access the Sencha CDN as part of the app build, you can manually download the files to your workspace.

Be sure that the 'packages/package-loader' path is placed in the correct root of your application or workspace.

Build

Should you want to build the package yourself, first you will need to setup the workspace which will need a local copy of Ext JS to build:

$ sencha workspace install ~/sencha-sdks
$ cd packages/package-loader
$ sencha package build