@expo/configure-splash-screen

中文文档
0.6.0发布于 2021/09/22MITCommonJS近 30 天下载 11.9万

Supplementary module for 'expo-splash-screen' providing cli configuration command

原始使用文档
文档目录8 节
  1. Content
  2. 🚀 Features
  3. 📱 iOS
  4. 🤖 Android
  5. 🗒 Usage
  6. Options:
  7. 🖥 Installation
  8. 👏 Contributing

@expo/configure-splash-screen

This package provides CLI command that helps you configure expo-splash-screen module. You can use it to configure your native iOS and Android project according to your needs without opening Xcode or Android Studio.

Content

🚀 Features

📱 iOS

  • Configures background color for native splash screen.
  • Configures expo-splash-screen to show given .png image.
  • Supports CONTAIN and COVER modes from expo-splash-screen.
  • Configures the StatusBar's attributes:
    • hiding,
    • style.
  • Supports separate SplashScreenView configuration for the dark mode.

🤖 Android

  • Configures background color for native splash screen.
  • Configures expo-splash-screen to show given .png image.
  • Supports CONTAIN, COVER and NATIVE modes from expo-splash-screen.
  • Configures the StatusBar's attributes:
    • hiding,
    • style,
    • backgroundColor,
    • translucency.
  • Supports separate SplashScreenView configuration for the dark mode.

🗒 Usage

Command syntax:

yarn run configure-splash-screen [options]

Options:

  • -p, --platform <platform> - Selected platform to configure. Available values: "android" | "ios" | "all" (default: "all").
  • -b, --background-color <color> - (required) Valid css-formatted color (hex (#RRGGBB[AA]), rgb[a], hsl[a], named color (https://drafts.csswg.org/css-color/#named-colors)) that would be used as the background color for native splash screen view.
  • -i, --image-path <path> - Path to valid .png image that will be displayed on the splash screen.
  • -r, --image-resize-mode <resizeMode> - Resize mode to be used for the splash screen image. Available only if 'image-path' is provided as well. Available values: "contain" | "cover" | "native" ("native" is only available for Android)) (default: "contain"). See resize modes for more information.
  • --dark-mode-background-color <color> - Color (see 'background-color' supported formats) that would be used as the background color for the splash screen in dark mode. Providing this option enables other dark-mode related options.
  • --dark-mode-image-path <path> - Path to valid .png image that will be displayed on the splash screen in dark mode only. Available only if 'dark-mode-background-color' is provided as well.
  • --status-bar-style <style> - Customizes the color of the status bar icons. Available values: "default" | "light-content" | "dark-content" (default: "default").
  • --status-bar-hidden - Hides the status bar.
  • --status-bar-background-color <color> - (only for Android platform) Customizes the background color of the status bar. Accepts a valid color (see 'background-color' supported formats).
  • --status-bar-translucent - (only for Android platform) Makes the status bar translucent (enables drawing under the status bar area).
  • --dark-mode-status-bar-style <style> - (only for Android platform) The same as 'status-bar-style', but applied only in dark mode. Available only if 'dark-mode-background-color' and 'status-bar-style' are provided as well.
  • --dark-mode-status-bar-background-color <color> - (only for Android platform) The same as 'status-bar-background-color', but applied only in the dark mode. Available only if 'dark-mode-background-color' and 'status-bar-style' are provided as well.

To see all the available options:

yarn run expo-splash-screen --help

🖥 Installation

This package is installed as a dependency of the expo-splash-screen package. Follow the installation instructions provided by expo-splash-screen package.

👏 Contributing

Contributions are very welcome! Please refer to guidelines described in the contributing guide.

版本与发布记录

@expo/configure-splash-screen 共发布 30 个版本,首次发布于 2020/05/06;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.6.0latest2021/09/225 年前
0.5.02021/06/245 年前
0.4.02021/05/155 年前
0.3.42021/02/045 年前
0.3.32021/01/275 年前
0.3.22020/12/155 年前

其他发布通道:next → 0.3.1。

关于 @expo/configure-splash-screen 的常见问题

@expo/configure-splash-screen 是什么?

Supplementary module for 'expo-splash-screen' providing cli configuration command

如何安装 @expo/configure-splash-screen?

在项目目录运行 npm install @expo/configure-splash-screen,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 expo-splash-screen、configure-splash-screen,可以用 npx expo-splash-screen 直接运行。

@expo/configure-splash-screen 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/expo__configure-splash-screen 是否存在。

@expo/configure-splash-screen 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@expo/configure-splash-screen 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=12。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@expo/configure-splash-screen 可以商用吗?

@expo/configure-splash-screen 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@expo/configure-splash-screen 的下载量有多少?

根据 npm 官方下载统计,@expo/configure-splash-screen 在 2026/10/14 – 2026/11/12 这 30 天内被下载 119,348 次,日均约 3,978 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@expo/configure-splash-screen 还在维护吗?

最新版本 0.6.0 发布于 2021/09/22(5 年前);至今共发布 30 个版本,其中过去 12 个月发布了 0 个;首次发布于 2020/05/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。