Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bob): add ignore pattern to config #450

Merged
merged 5 commits into from
Sep 15, 2023
Merged

Conversation

atlj
Copy link
Collaborator

@atlj atlj commented Aug 24, 2023

Summary

This adds the possibility to pass custom ignore patterns while working with builder bob.

Test plan

  1. Create a new library using create-react-native-library. You can select Native module, and Kotlin & Swift options.
  2. Go to package.json, and find the react-native-builder-bob section
  3. Replace commonjs target as following:
{
    "exclude": "**/ignore_me/**"
    "targets": [
      "commonjs",
      "module",
      [
        "typescript",
        {
          "project": "tsconfig.build.json"
        }
      ]
    ]
}
  1. Create a new folder named src/ignore_me and put .ts files inside it
  2. Build the library and make sure the files inside the ignore_me aren't included in the commonjs and module targets.

@atlj atlj force-pushed the @atlj/bob-config-ignore-field branch from 3aec318 to 298780c Compare August 24, 2023 14:07
@atlj atlj changed the title @atlj/bob config ignore field feat(bob): add ignore pattern to config Aug 24, 2023
README.md Show resolved Hide resolved
@@ -418,7 +418,7 @@ yargs
root,
source: path.resolve(root, source as string),
output: path.resolve(root, output as string, 'commonjs'),
options: targetOptions,
options: { ...targetOptions, exclude: options.exclude },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are use the pattern of passing top-level options in the argument object (like source, output) and target specific options in the options field. So lets do the same for exclude.

@satya164 satya164 merged commit ef37512 into main Sep 15, 2023
31 of 32 checks passed
@satya164 satya164 deleted the @atlj/bob-config-ignore-field branch September 15, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants