npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@propelics/tiapp-updater

v1.0.1

Published

Updates the tiapp.xml file based on a list of different settings.

Downloads

28

Readme

tiapp-updater

Introduction

image

For Titanium projects. Automatically updates the tiapp.xml file based on a given configguration file and an environment to load from that config file.

Basic usage

From CLI:

$ npm install --save-dev tiapp-updater

$ ./node_modules/js-updater/bin/jsupdater --tiapp <path-to-your-tiapp.xml-file> --config <path-to-your-config-json-file> --env <env-to-load> [--save]

From Node:

var tiappUpdater = require('tiapp-updater');

newTiapp = tiappUpdater.updateTiapp({
	tiapp: 'path-to-tiapp.xml',
	config: 'path-to-config.json',
	env: 'env-to-load',
	save: true // false to prevent the tiapp.xml file to be edited
});

console.log(newTiapp);

Config file and environment

The config file can be a JSON file or any JS file that returns an object.

An environment (env) is any first-level key loaded from the config file.

There could be an special global key inside the config file. If global is defined, the properties will be applied in cascade (global then env will replace the repeated properties).

Example config.json

{
    "global": {
    	"appId": "com.test.generic",
    	"appName": "Generic Name",
        "guid": "11111111-1111-1111-1111-111111111111",
        "version:format": "major.minor.build",
        "properties": {
            "appc-app-id": "111111111111111111111111"
        }
    },
    "dev": {
        "appId": "com.test.dev",
        "appName": "My App DEV",
        "version:format": "major.minor.build|bump.0"
    },
    "test": {
        "appId": "com.test.test",
        "appName": "My App TEST",
        "version:format": "major.minor.build.1"
    },
    "pre-prod": {
        "appId": "com.test.preprod",
        "appName": "My App PRE-PROD",
        "version:format": "major.minor.build.2"
    },
    "prod": {
        "appId": "com.test.prod",
        "appName": "My App",
        "guid": "22222222-2222-2222-2222-222222222222",
        "version:format": "major.minor",
        "properties": {
            "appc-app-id": "app-id-prod"
        }
    }
}

Properties supported

  • appId modifies the <id>com.app.identifier</id> value.

  • guid modifies the <guid>App GUID</guid> value.

  • appName modifies the <name>App Name</name> value.

    • Note: In Android, you may have an <activity> tag within the <manifest> with the property android:name. If that's the case, this will be updated too as long as this is the first activity tag inside application.
  • version:format modifies the version of the app following a given format, the available values for formatting are:

    • major the current first value of the version (1.0.0).

    • minor the current second value of the version (1.0.0).

    • build the current third value of the version (1.0.0).

    • Any digit(s) will just copy them in the given spot of the version (e.g. Given version 1.0.0 and format major.minor.3 will generate 1.0.3).

    • Functions. Additional to the format, some function(s) could be applied with the caret character (|). This will generate first the value from the format, then apply the given functions from left to right. Supported functions so far:

      • bump Will add 1 to the number.
  • properties will add/modify the <property id="my-id"></property> tag(s).

    • If the given id already exists in the tiapp.xml, it will replace it.

    • If the id does not exist, will create a new property tag.

    • Note this will not remove property tags at any time.

License

Copyright 2017 Propelics, Inc.

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.