Skip to content

PeiJueChen/jj-cli

Repository files navigation

jj-cli

A Tool CLI

Install

    npm i jj-cli -g

Usage git

    j -h (help)
    j gpush <messgae> -b [branch] -d [depository]
    j gpull -b [branch] -d [depository]
    j gtag [tagName] -d [depository]

Usage open ios/platform

  • For: cordova app / capacitor app
    j open ios
    j open android
    j openpath xxxx  // open your folder

Usage upload ios/platform to appcenter

  • For: cordova app / capacitor app
  • Before using, make sure that there is .apk/.ipa under the ios/android folder , Or set your apppath: --apppath: xxxxx(./)
    j upload android -n <appcenter release notes> -path xxxx
    j upload ios -n <appcenter release notes> -path xxxx
    j appcenter login
    j appcentet logout
    * Contains reading parameters from jj.config.json to upload 
    

Usage template

  • node
  • python xxx(project name)
  • -pn : Set your project name
  • -fp / --folderpath: Set your folder path.
    j create node 
    j create node -fp xxxxxx
    j create python xxxx(project name)
    j create python xxxx -fp xxxxxx

Usage preview

  • Help you run a local service
  • j preview
  • -host: default is localhost
  • -port: default is 5000
  • -staticFolderName: default is dist
    j preview
    j preview -host 192.168.3.2
    j preview -port 5888

Usage ip

  • Get the IP address of your pc/mac
    j ip

Usage sign

  • Help you sign android apk; platform: android(default)
  • Please write your config file at current directory
{

    "unsignedApk": "./app-release-unsigned.apk",
    "defaultAlias": "key0",
    "defaultAppcenterToken": "xxxx",
    "projects": [
        {
            "name": "xxxx",
            "keyStoreFile": "xxxx/bkapp.jks",
            "storepass": "pwd",
            "keypass": "pwd",
            "alias": "key0",
            "appcenter": {
                "android": {
                    "prd": {
                        "userName": "xxx",
                        "appName": "xxxx",
                        "group": "xxx"
                    },
                    "uat": {
                        "userName": "xxx",
                        "appName": "xxxx",
                        "group": "xxx"
                    }
                },
                "ios": {
                    "prd": {
                       "userName": "xxx",
                        "appName": "xxxx",
                        "group": "xxx"
                    },
                    "uat": {
                        "userName": "xxx",
                        "appName": "xxxx",
                        "group": "xxx"
                    }
                }
            },
            "pgyer": {
                "apiKey": "xxx",
                "userKey": "xxx",
                "buildPassword": "xxxx",
                "android": {
                    "appKey": "xxxxx",
                    "description": "for test"
                },
                "ios": {
                    "appKey": "xxxx",
                    "description": "for test"
                }
            }
        }
    ]

}
j sign
j sign -pn xxx(your project, find from projects in config )
j sign -fp xxxxx(your signature configuration folder path, must have jj.config.json, jks...)
j sign -appcenter xxx(prd/uat: Specify the uat/prd you. configured in jj.config.json )

Usage zip

  • Help you zip file or folder
j zip -output xxx.zip file file folder...