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

expo-manifest-placeholders

v0.3.0

Published

An Expo config plugin to set manifest placeholders for Android gradle automatically

Downloads

35

Readme

expo-manifest-placeholders

English · 中文


English

An Expo config plugin that automatically injects manifestPlaceholders into your Android app/build.gradle during expo prebuild. Useful for SDKs that read placeholder values from AndroidManifest.xml (e.g. push notification, map, or analytics SDKs).

Installation

npm install expo-manifest-placeholders
# or
yarn add expo-manifest-placeholders
# or
bun add expo-manifest-placeholders

expo must already be installed in your project (peer dependency).

Usage

Add the plugin to app.json or app.config.js and pass the plugin options as the second argument:

{
  "expo": {
    "plugins": [
      [
        "expo-manifest-placeholders",
        {
          "enabled": true,
          "manifestPlaceholders": {
            "JPUSH_APPKEY": "your-app-key",
            "JPUSH_CHANNEL": "developer-default"
          }
        }
      ]
    ]
  }
}

Then run prebuild:

npx expo prebuild -p android

Generated output

The plugin inserts a block inside defaultConfig in android/app/build.gradle:

defaultConfig {
    // @generated begin expo-manifest-placeholders
    manifestPlaceholders += [
            JPUSH_APPKEY: "your-app-key",
            JPUSH_CHANNEL: "developer-default"
    ]
    // @generated end expo-manifest-placeholders
    // ...
}

These placeholders can then be referenced in AndroidManifest.xml:

<meta-data
    android:name="JPUSH_APPKEY"
    android:value="${JPUSH_APPKEY}" />

Options

| Key | Type | Default | Description | | --- | --- | --- | --- | | enabled | boolean | true | Whether the plugin is active. When false, existing generated blocks are removed and no new placeholders are added. | | manifestPlaceholders | Record<string, string> | — | Placeholder key-value pairs written to manifestPlaceholders in build.gradle. |

To temporarily disable the plugin while keeping it in your config:

{
  "enabled": false,
  "manifestPlaceholders": {
    "JPUSH_APPKEY": "your-app-key"
  }
}

Notes

  • Android only — this plugin does not modify iOS configuration.
  • Idempotent — re-running expo prebuild replaces the previous generated block instead of duplicating it.
  • Disable cleanup — setting enabled to false removes previously generated content without writing new placeholders.
  • Managed & bare workflow — works with any Expo project that uses config plugins and prebuild.

Development

git clone https://github.com/likeSo/expo-manifest-placeholders.git
cd expo-manifest-placeholders
bun install
bun run build

See the example/ directory for a working sample app.

License

MIT © Aron


中文

一个 Expo Config Plugin,在运行 expo prebuild 时自动向 Android 的 app/build.gradle 注入 manifestPlaceholders。适用于需要从 AndroidManifest.xml 读取占位符值的 SDK(例如推送、地图、统计等)。

安装

npm install expo-manifest-placeholders
# 或
yarn add expo-manifest-placeholders
# 或
bun add expo-manifest-placeholders

项目中需已安装 expo(peer dependency)。

用法

app.jsonapp.config.js 中注册插件,并将插件配置作为第二个参数传入:

{
  "expo": {
    "plugins": [
      [
        "expo-manifest-placeholders",
        {
          "enabled": true,
          "manifestPlaceholders": {
            "JPUSH_APPKEY": "你的AppKey",
            "JPUSH_CHANNEL": "developer-default"
          }
        }
      ]
    ]
  }
}

然后执行 prebuild:

npx expo prebuild -p android

生成结果

插件会在 android/app/build.gradledefaultConfig 中插入如下代码块:

defaultConfig {
    // @generated begin expo-manifest-placeholders
    manifestPlaceholders += [
            JPUSH_APPKEY: "你的AppKey",
            JPUSH_CHANNEL: "developer-default"
    ]
    // @generated end expo-manifest-placeholders
    // ...
}

之后即可在 AndroidManifest.xml 中引用这些占位符:

<meta-data
    android:name="JPUSH_APPKEY"
    android:value="${JPUSH_APPKEY}" />

配置说明

| 键 | 类型 | 默认值 | 说明 | | --- | --- | --- | --- | | enabled | boolean | true | 是否启用插件。设为 false 时会删除已生成的配置,但不会写入新的占位符。 | | manifestPlaceholders | Record<string, string> | — | 占位符键值对,会写入 build.gradle 中的 manifestPlaceholders。 |

临时禁用插件(同时清理已生成内容):

{
  "enabled": false,
  "manifestPlaceholders": {
    "JPUSH_APPKEY": "你的AppKey"
  }
}

注意事项

  • 仅支持 Android — 不会修改 iOS 配置。
  • 可重复执行 — 多次运行 expo prebuild 会替换已有生成块,不会产生重复内容。
  • 禁用即清理 — 将 enabled 设为 false 会移除之前生成的内容,且不会写入新的占位符。
  • Managed & Bare 工作流 — 适用于使用 config plugin 和 prebuild 的 Expo 项目。

本地开发

git clone https://github.com/likeSo/expo-manifest-placeholders.git
cd expo-manifest-placeholders
bun install
bun run build

可参考 example/ 目录中的示例项目。

许可证

MIT © Aron