Socket
Socket
Sign inDemoInstall

@expo/config

Package Overview
Dependencies
11
Maintainers
24
Versions
225
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/config

A library for interacting with the app.json


Version published
Weekly downloads
1.1M
increased by9.17%
Maintainers
24
Install size
6.30 MB
Created
Weekly downloads
 

Package description

What is @expo/config?

@expo/config is a package that provides utilities for reading, writing, and modifying Expo configuration files. It is particularly useful for managing app.json and app.config.js files in Expo projects.

What are @expo/config's main functionalities?

Reading Configuration

This feature allows you to read the configuration of an Expo project. The `getConfig` function reads the app.json or app.config.js file and returns the configuration object.

const { getConfig } = require('@expo/config');
const config = getConfig('/path/to/project');
console.log(config);

Modifying Configuration

This feature allows you to modify the configuration of an Expo project. The `modifyConfigAsync` function takes the path to the project and an object with the modifications you want to make.

const { modifyConfigAsync } = require('@expo/config');
(async () => {
  const result = await modifyConfigAsync('/path/to/project', {
    updates: {
      enabled: true
    }
  });
  console.log(result);
})();

Writing Configuration

This feature allows you to write a new configuration to the app.json file. The `writeConfigJsonAsync` function takes the path to the project and the new configuration object.

const { writeConfigJsonAsync } = require('@expo/config');
(async () => {
  const result = await writeConfigJsonAsync('/path/to/project', {
    name: 'NewAppName',
    slug: 'new-app-slug'
  });
  console.log(result);
})();

Other packages similar to @expo/config

Readme

Source

config

A library for interacting with the app.json

Keywords

FAQs

Last updated on 10 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc