New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@expo/config

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
e

@expo/config

A library for interacting with the app.json

0.0.1-canary-20231130-ede75a7
96

Supply Chain Security

75

Quality

100

Maintenance

100

Vulnerabilities

100

License

Version published
Weekly downloads
1.6M
-9.06%
Maintainers
26
Weekly downloads
 
Created
Issues
830

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

FAQs

Package last updated on 30 Nov 2023

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