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

garmin-scripts

v1.4.0

Published

A collection of scripts for building Garmin Connect IQ applications within the terminal.

Downloads

6

Readme

Garmin Connect IQ Scripts

A collection of scripts for building Garmin Connect IQ applications within the Windows terminal.

It's using the SDK version which is configured in the Connect IQ SDK Manager.

package.json example

{
  "scripts": {
    "build:debug": "npx -y -p=garmin-scripts build --debug",
    "build:beta": "npx -y -p=garmin-scripts build --beta",
    "build:release": "npx -y -p=garmin-scripts build --release",
    "build:simulator": "npx -y -p=garmin-scripts build --simulator fr645m",
    "era:live": "npx -y -p=garmin-scripts era 01234567-89ab-cdef-0123-456789abcdef",
    "era:beta": "npx -y -p=garmin-scripts era fedcba98-7654-3210-fedc-ba9876543210",
    "list-models-by-memory-usage": "npx -y -p=garmin-scripts list-models-by-memory-usage",
    "list-models-by-bits-per-pixel": "npx -y -p=garmin-scripts list-models-by-bits-per-pixel",
    "list-unused-models": "npx -y -p=garmin-scripts list-unused-models",
    "get-model-by-product-id": "npx -y -p=garmin-scripts get-model-by-product-id 006-B3990-00"
  }
}

Preparations

developer_key

Create a developer key and store it in a file named developer_key in the root of your project.

⚠️ Don't upload your key file to a public Git repository. Add this file name to your .gitignore!

.store

Create a JSON file named .store in the root of your project.

This file can have 3 properties: "release", "beta" and "debug". Each of them represents the application ID which is injected into your manifest.xml, if you build of of these versions.

{
    "release": "01234567-89ab-cdef-0123-456789abcdef",
    "beta": "01234567-89ab-cdef-0123-456789abcdef",
    "debug": "01234567-89ab-cdef-0123-456789abcdef"
}

If the application ID for a specific version is missing "00000000-0000-0000-0000-000000000000" is used.

Scripts

Build / Run simulator

npx -y -p=garmin-scripts build --debug
npx -y -p=garmin-scripts build --beta
npx -y -p=garmin-scripts build --release
npx -y -p=garmin-scripts build --simulator fr645m

Specify devices for --debug and --simulator

For --debug amd --simulator a device can specified. If the device name is omitted, the script will falls back to fenix7.

Setting of application ID in manifest.xml

As described above, the application IDs from the .store are injected into the manifest.xml, while running a build. After the build is finished, the ID is unset.

It's important to have atleast id="" in the iq:application tag of your manifest.xml, as this is the place where the ID is injected.

For example:

<iq:application id="" type="datafield" name="@Strings.AppName" entry="App" launcherIcon="@Drawables.LauncherIcon" minApiLevel="3.0.0">

⚠️ Remember not to change or commit this file while the build is running, otherwise the automatic reverting of the ID after the build has been finished could lead to unexpected results.

Setting of application name

While compiling using --debug and --beta, the script will crawl through all XML files and searches for such a tag:

<string id="AppName">[YOUR APPLICATION NAME]</string>

If it find one, it will append " (debug)" to the app name string in --debug mode, and " (beta)" to the app name string in --beta mode.

⚠️ Remember not to change or commit these files while the build is running, otherwise the automatic reverting of these changes after the build has been finished could lead to unexpected results.

Exclude whole source code files for debugging or in the release

It is possible to include source code files only in debug mode or only in release/beta mode. To achieve this, give the respective files the extension ".debug.mc" or ".release.mc". In debug mode, *.release.mc files will be renamed to *.release.mc-, while in release/beta mode *.debug.mc filess will be renamed to *.debug.mc- to force the compiler to ignore these files. After the compilation is done, the files are renamed back to their original file name.

This can be helpful to create 2 versions of a module, one with logging of debug information or which mocks data, and one for the release version.

⚠️ Remember not to change or commit files while the build is running, otherwise this renaming could lead to unexpected results.

Error Reporting Application

npx -y -p=garmin-scripts era 01234567-89ab-cdef-0123-456789abcdef

List installed models by their memory usage

npx -y -p=garmin-scripts list-models-by-memory-usage

⚠️ Only devices which are installed by the Connect IQ SDK Manager are covered.

List installed models by their bits per pixel (number of colors)

npx -y -p=garmin-scripts list-models-by-bits-per-pixel

⚠️ Only devices which are installed by the Connect IQ SDK Manager are covered.

List installed models which are not mentioned in the manifest.xml

npx -y -p=garmin-scripts list-unused-models

⚠️ Only devices which are installed by the Connect IQ SDK Manager are covered.

Get model name by Product ID

Error reports may only contain a Product ID. To get it's name, you can use this script.

npx -y -p=garmin-scripts get-model-by-product-id 006-B3990-00

⚠️ Only devices which are installed by the Connect IQ SDK Manager are covered.