Skip to content

Conversation

@szymonrybczak
Copy link
Collaborator

Summary:

Closes #2253

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Create react-native.config.ts with some config.
  3. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js config
  1. Changes applied inside react-native.config.ts should be visible inside command's output.

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@szymonrybczak
Copy link
Collaborator Author

I think we should export Config type through @react-native-community/cli so users could use it inside a config file:

import {Config} from '@react-native-community/cli';

const config: Config = {
  commands: [
    {
      name: 'hello  ',
      func: () => {
        console.log('hello');
      },
    },
  ],
};

export default config;

Right now it's exported through cli-types so users cannot import it directly from react-native.config.ts

@szymonrybczak szymonrybczak force-pushed the feat/add-support-for-react-native-config-ts branch from 3432ae2 to 493c8c7 Compare March 25, 2024 09:46
@thymikee
Copy link
Member

Let's add an e2e test that verifies a TS file is read

@szymonrybczak szymonrybczak marked this pull request as ready for review March 28, 2024 15:45
@szymonrybczak szymonrybczak force-pushed the feat/add-support-for-react-native-config-ts branch from adb5c53 to 8221b51 Compare March 28, 2024 16:01
@szymonrybczak
Copy link
Collaborator Author

Let's add an e2e test that verifies a TS file is read

Tests landed ✅ might giving review again?

@thymikee thymikee merged commit 86ada98 into main Apr 4, 2024
@thymikee thymikee deleted the feat/add-support-for-react-native-config-ts branch April 4, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for react-native.config.ts

3 participants