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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@test-publish-sdks/widget-template-mobile

v0.0.4

Published

Nx plugin providing generators for CDX extensibility starter mobile widgets - Part of Candescent Developer Experience (CDX)

Readme

@cdx-extensions/widget-template-mobile

Nx plugin providing generators for CDX extensibility starter mobile features and widgets (React Native + PlatformSDK).

Installation

From npm (published version)

npm install @cdx-extensions/widget-template-mobile
# or
yarn add @cdx-extensions/widget-template-mobile

Use the template in the apps repo

Pass the FI Id and name (and optional flags); no template path is needed:

# Full-featured screen with user context, branding, and HTTP client demo
nx g @cdx-extensions/widget-template-mobile:feature --fiId=acme --name=my-feature

# Lightweight widget with user context and branding only
nx g @cdx-extensions/widget-template-mobile:widget --fiId=acme --name=my-widget

Optional: --directory=..., --sandboxPath=playground/mobile-sandbox if your mobile-sandbox lives elsewhere.

Generators

feature

Generates a mobile feature library with user-context, branding, and HTTP client demo cards plus config.ts. The feature gets its own screen and tab in the sandbox.

Basic usage

nx generate @cdx-extensions/widget-template-mobile:feature --fiId=<fi-id> --name=<name>

Options

  • fiId (required) – Your FI Id. Used as the package scope: the generated package name will be @<fiId>-extensions/<name>.
  • name (required) – Name of the mobile feature (e.g. account-summary). Used as the Nx project name and folder name.
  • directory (optional) – Parent directory for the new project. Default: features/mobile.
  • sandboxPath (optional) – Path to the mobile-sandbox app (relative to workspace root). Default: playground/mobile-sandbox.

Examples

nx generate @cdx-extensions/widget-template-mobile:feature --fiId=acme --name=my-feature

# Custom sandbox location
nx g @cdx-extensions/widget-template-mobile:feature --fiId=acme --name=my-feature --sandboxPath=apps/my-mobile-host

After generation

If a mobile sandbox exists at sandboxPath, the generator:

  • Adds @<fiId>-extensions/<name> to playground/mobile-sandbox/package.json dependencies with a local path (file:../../<projectRoot>)
  • Adds the feature path to playground/mobile-sandbox/metro.config.js and tsconfig.json
  • Creates playground/mobile-sandbox/screens/<Name>Screen.tsx that renders the feature
  • Adds a new tab in playground/mobile-sandbox/navigation/tabs.tsx for that screen

If no sandbox is present, the generator creates the project files only and skips sandbox wiring.

Generated structure

  • src/.tsx – Component with user-context card, HTTP client test card, and branding
  • src/config.ts – API base URL & path for the HTTP client demo
  • src/types/branding.ts – Branding color resolver with fallbacks
  • package.json, project.json, tsconfig.json, src/index.ts

widget

Generates a lightweight mobile widget library with user-context and branding demo only (no HTTP, no config.ts). The widget is patched into a shared WidgetsScreen.tsx rather than getting its own tab.

Basic usage

nx generate @cdx-extensions/widget-template-mobile:widget --fiId=<fi-id> --name=<name>

Options

  • fiId (required) – Your FI Id. Used as the package scope: the generated package name will be @<fiId>-extensions/<name>.
  • name (required) – Name of the mobile widget (e.g. my-widget). Used as the Nx project name and folder name.
  • directory (optional) – Parent directory for the new project. Default: widgets/mobile.
  • sandboxPath (optional) – Path to the mobile-sandbox app (relative to workspace root). Default: playground/mobile-sandbox.

Examples

nx generate @cdx-extensions/widget-template-mobile:widget --fiId=acme --name=my-widget

# Custom sandbox location
nx g @cdx-extensions/widget-template-mobile:widget --fiId=acme --name=my-widget --sandboxPath=apps/my-mobile-host

After generation

If a mobile sandbox exists at sandboxPath, the generator:

  • Adds @<fiId>-extensions/<name> to playground/mobile-sandbox/package.json dependencies with a local path (file:../../<projectRoot>)
  • Adds the widget path to playground/mobile-sandbox/metro.config.js and tsconfig.json
  • Patches playground/mobile-sandbox/screens/WidgetsScreen.tsx to import and render <WidgetName />

No dedicated screen or tab is created -- widgets share the existing Widgets screen.

If no sandbox is present, the generator creates the project files only and skips sandbox wiring.

Generated structure

  • src/.tsx – Component with user-context card and branding (no HTTP card)
  • src/types/branding.ts – Branding color resolver with fallbacks
  • package.json, project.json, tsconfig.json, src/index.ts

Running the generated project

From the workspace root:

nx run <name>:build
nx run <name>:dev
nx run <name>:typecheck

Running the mobile sandbox (Android & iOS)

After you generate a feature or widget, the sandbox at sandboxPath is updated automatically; run the host app from your consumer workspace root (e.g. the apps monorepo). Typical layout: playground/mobile-sandbox.

  1. Install dependencies

    npm install
  2. Start Metro (Expo dev server)

    npx nx run mobile-sandbox:start
  3. Open a platform (use a second terminal while Metro is running, or follow your team's flow)

    iOS

    npx nx run mobile-sandbox:ios

    Android

    npx nx run mobile-sandbox:android

Note: The Nx project name (mobile-sandbox) and targets (start, ios, android) must exist in your repo. If they differ, check playground/mobile-sandbox/project.json or run npx nx show project mobile-sandbox. As a fallback you can run Expo from the sandbox folder, e.g. cd playground/mobile-sandbox && npx expo start, then press i / a for iOS / Android.