Wiki

Clone wiki

ExtJSPackages / Packages management

Steps to maintain an online packages repository.

https://docs.sencha.com/cmd/guides/cmd_packages/cmd_creating_packages.html

Initialice local repository (only once)

The default local repository (in my case) is where Sencha Cmd is installed: ~/bin/Sencha/Cmd/repo

#!bash
$ sencha package repo init -name "My Company" -email "support@mycompany.com"
NOTE: The name argument must match the value of the creator property you set in the "package.json"

Backup the files created:

  • .sencha/pkg/certs.json : name, email an public key
  • .sencha/repo/private-key.json : private key

Create a package

#!bash
$ sencha generate package foo

Build the package

First, update the version in the file package.json of the package project.

Second, build the package:

#!bash
$ sencha package build
Will create:

  • The development build in build/
  • The deployment package .pkg in ../../../build

Add the created package to your local repository

Go to the .pkg build directory (the root of the packages project in my case) and execute (will use your private key for fancy stuff):

#!bash
$ sencha package add foo.pkg
This will add the package to your local repository ~/bin/Sencha/Cmd/repo/pkgs/....

Deploy online

Copy your local repository pkgs (at ~/bin/Sencha/Cmd/repo) - or merge it by hand, known for me as "what a hell" - to your bitbucket.io deployment project in a pkgs directory. This is: the online repository just mimics your local repository (it is like a local repository).

In my personal BitBucket page (how to create a BitBucket page) I have a folder which will be added as a remote repository when you execute:

#!bash
$ sencha repo add alfonsonishikawa https://alfonsonishikawa.bitbucket.io/extjspackages/pkgs

Refresh the packages used in your projects

Sync your local repository with the online repository to discover the new packages:

#!bash
$ sencha repo sync

In each project that you want the package to be updated to the last in the local repository (or remote repository):

#!bash
$ sencha app refresh --packages

List packages

#!bash
$ sencha package list

List packages in local catalog

#!bash
$ sencha package list .

Updated