{"id":25344774,"url":"https://github.com/iyegoroff/make-react-native-package","last_synced_at":"2025-10-19T09:08:48.596Z","repository":{"id":35085846,"uuid":"204839980","full_name":"iyegoroff/make-react-native-package","owner":"iyegoroff","description":"CLI tool for bootstrapping react-native packages with Kotlin \u0026 Swift \u0026 Typescript","archived":false,"fork":false,"pushed_at":"2022-02-12T13:01:16.000Z","size":1028,"stargazers_count":36,"open_issues_count":8,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-08T15:17:35.303Z","etag":null,"topics":["componentkit","jetpack-compose","kotlin","litho","react-native","swift","swift-ui"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iyegoroff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-28T03:26:07.000Z","updated_at":"2023-06-13T04:48:55.000Z","dependencies_parsed_at":"2022-08-08T05:00:32.738Z","dependency_job_id":null,"html_url":"https://github.com/iyegoroff/make-react-native-package","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyegoroff%2Fmake-react-native-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyegoroff%2Fmake-react-native-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyegoroff%2Fmake-react-native-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyegoroff%2Fmake-react-native-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iyegoroff","download_url":"https://codeload.github.com/iyegoroff/make-react-native-package/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238837826,"owners_count":19539079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["componentkit","jetpack-compose","kotlin","litho","react-native","swift","swift-ui"],"created_at":"2025-02-14T11:51:17.481Z","updated_at":"2025-10-19T09:08:43.564Z","avatar_url":"https://github.com/iyegoroff.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# make-react-native-package\n[![npm version](https://badge.fury.io/js/make-react-native-package.svg)](https://badge.fury.io/js/make-react-native-package)\n[![CircleCI](https://circleci.com/gh/iyegoroff/make-react-native-package.svg?style=svg)](https://circleci.com/gh/iyegoroff/make-react-native-package)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard)\n[![Dependency Status](https://david-dm.org/iyegoroff/make-react-native-package.svg)](https://david-dm.org/iyegoroff/make-react-native-package)\n[![devDependencies Status](https://david-dm.org/iyegoroff/make-react-native-package/dev-status.svg)](https://david-dm.org/iyegoroff/make-react-native-package?type=dev)\n[![npm](https://img.shields.io/npm/l/express.svg)](https://www.npmjs.com/package/make-react-native-package)\n\nCLI tool for bootstrapping react-native packages with Kotlin \u0026 Swift \u0026 Typescript\n\n## About\n\n- CLI tool:\n  - single command to scaffold a monorepo with package itself and ready-to-run example app\n  - can create any amount of dummy native components and modules inside same package\n  - has multiple component templates\n  - versioning doesn't follow 'semver', major and minor numbers match the ones from specific version of \u003ccode\u003ereact\u0026#x2011;native\u003c/code\u003e whose project template is used by MRNP\n- Bootstrapped package:\n  - supports `iOS` \u0026 `Android` \u0026 react-native \"\u003cstrong\u003e\u0026gt;= 0.60.0\u003c/strong\u003e\"\n  - contains (absolutely optional) basic CI setup: CircleCI -\u0026gt; lint \u0026 build -\u0026gt; npm\n  - has setup instructions for package end-users in generated `README.md` files\n  - includes a `Dockerfile` for creating a release example `.apk` in 'neutral' environment\n\n## Getting started\n\n```\n$ npx make-react-native-package -p react-native-cool-component --githubUsername cool-github-user\n```\n\n## Usage guide\n\n```\n$ npx make-react-native-package --help\n```\n\n\u003cpre\u003e\n\u003cstrong\u003eUsage\u003c/strong\u003e\n\n  $ make-react-native-package \u0026lt;\u003cstrong\u003e--packageName\u003c/strong\u003e \u003cem\u003ename\u003c/em\u003e\u0026gt; \u0026lt;\u003cstrong\u003e--githubUsername\u003c/strong\u003e \u003cem\u003euser\u003c/em\u003e\u0026gt; ...\n\n\u003cstrong\u003eRequired options\u003c/strong\u003e\n\n  \u003cstrong\u003e-p, --packageName\u003c/strong\u003e \u003cem\u003estring\u003c/em\u003e      The name of project folder, github repo and npm package\n  \u003cstrong\u003e-g, --githubUsername\u003c/strong\u003e \u003cem\u003estring\u003c/em\u003e   Your github username\n\n\u003cstrong\u003eOptions\u003c/strong\u003e\n\n  \u003cstrong\u003e-h, --help\u003c/strong\u003e                   Print this usage guide\n  \u003cstrong\u003e-a, --appName\u003c/strong\u003e \u003cem\u003estring\u003c/em\u003e         Example app name\n  \u003cstrong\u003e-o, --objcPrefix\u003c/strong\u003e \u003cem\u003estring\u003c/em\u003e      Objective-C file prefix\n  \u003cstrong\u003e-c, --components\u003c/strong\u003e \u003cem\u003estring[]\u003c/em\u003e    List of space-separated native component names\n  \u003cstrong\u003e-m, --modules\u003c/strong\u003e \u003cem\u003estring[]\u003c/em\u003e       List of space-separated native module names\n  \u003cstrong\u003e-d, --description\u003c/strong\u003e \u003cem\u003estring\u003c/em\u003e     Package description\n  \u003cstrong\u003e-n, --npmUsername\u003c/strong\u003e \u003cem\u003estring\u003c/em\u003e     Your npm username\n  \u003cstrong\u003e-e, --email\u003c/strong\u003e \u003cem\u003estring\u003c/em\u003e           Your npm email\n  \u003cstrong\u003e-w, --withoutConfirmation\u003c/strong\u003e    Skip confirmation prompt\n  \u003cstrong\u003e-s, --skipInstall\u003c/strong\u003e            Skip dependency installation\n  \u003cstrong\u003e-t, --templates\u003c/strong\u003e \u003cem\u003estring[]\u003c/em\u003e     List of space-separated component templates:\n                               \u003cstrong\u003eios:default\u003c/strong\u003e - default Swift template\n                               \u003cstrong\u003eandroid:default\u003c/strong\u003e - default Kotlin template\n                               \u003cstrong\u003eios:swift-ui\u003c/strong\u003e - SwiftUI component template\n                               \u003cstrong\u003eandroid:jetpack-compose\u003c/strong\u003e - Jetpack Compose component template\n                               \u003cstrong\u003eios:component-kit\u003c/strong\u003e - ComponentKit Objective-C++ component template\n                               \u003cstrong\u003eandroid:litho\u003c/strong\u003e - Litho Kotlin component template\n\n\u003cstrong\u003eExample\u003c/strong\u003e\n\n  $ make-react-native-package \u003cstrong\u003e--packageName\u003c/strong\u003e \u003cem\u003ereact-native-cool-component\u003c/em\u003e\n    \u003cstrong\u003e--githubUsername\u003c/strong\u003e \u003cem\u003eoctocat\u003c/em\u003e \u003cstrong\u003e--appName\u003c/strong\u003e \u003cem\u003eCoolExample\u003c/em\u003e \u003cstrong\u003e--objcPrefix\u003c/strong\u003e \u003cem\u003eRNCC\u003c/em\u003e\n    \u003cstrong\u003e--description\u003c/strong\u003e \u003cem\u003e\"Cool description\"\u003c/em\u003e \u003cstrong\u003e--npmUsername\u003c/strong\u003e \u003cem\u003ewombat\u003c/em\u003e \u003cstrong\u003e--email\u003c/strong\u003e \u003cem\u003eme@mail.org\u003c/em\u003e\n    \u003cstrong\u003e--templates\u003c/strong\u003e \u003cem\u003eios:swift-ui android:jetpack-compose\u003c/em\u003e\n\u003c/pre\u003e\n\n## Workflow\n\n### Installation\n\nUsually no additional steps required after bootstrapping a package. However, if you have skipped dependency installation with \u003cstrong\u003e--skipInstall\u003c/strong\u003e option you can setup everything later by running `npm run init:package` from package root folder.\n\n### Development\n\nGenerated folder contains the package itself in the root and the sample app inside `./example` folder.\nExample app imports package dependency locally as a `file:..` symlink, so all changes inside the root folder will be available for a running app and editors/IDEs immediately.\n\nTo watch on Typescript sources changes you have to run `npm run watch` commands from \u003cstrong\u003eboth\u003c/strong\u003e root and `./example` folders. Most of 'development' commands are located in `./example/package.json` scripts section, and `watch` script from `./package.json` probably is the only common 'development' command in the root folder.\n\nTo open a project in `Xcode` go to `./example/ios` folder and open `.xcworkspace` file, package `Swift` sources should be found inside `Pods \u003e Development Pods \u003e {{packageName}}` group in project navigator.\n\nTo open a project from `Android Studio` 'welcome to' window press `Import project` and open `./example/android` folder, after `gradle` sync task completes package `Kotlin` sources should be found inside `{{packageName}} \u003e java` group in project tool window.\n\nTo build native code and run sample app on device/simulator just use standard react-native 'run' commands or 'run' buttons from `Xcode`/`Android Studio`.\n\n### Publishing\n\nThere are two options: publishing from local machine or publishing from CircleCI.\n\nTo publish from a local machine just run `npm version \u003cyour_package_next_version\u003e \u0026\u0026 npm publish` from package root folder. It will run linters and build Typescript sources in `preversion` hook and push changes and git tags to a remote repo in `postversion` hook. Then if everything succeed, the package will be published to npm.\n\nIf you have an account on CircleCI you can use it for publishing a package when git tags are being pushed to a remote repo. Note that before enabling your package in CircleCI dashboard you should either ask their support for [macOS plan](https://circleci.com/pricing/#faq-section-linux) (it is free for open-source projects) or remove `test-ios` job related code from `.circleci/config.yml` file. Also you have to set `NPM_TOKEN` environment variable in CircleCI dashboard project settings - this token can be created directly on [npmjs.com](https://npmjs.com) or imported from your other CircleCI project. When everything is ready run `npm version \u003cyour_package_next_version\u003e -m \"%s [skip ci]\"` to initiate just `publish` job on CircleCI without triggering surplus `test-ios` \u0026 `test-android` jobs because of master branch changes. It won't only lint sources and build Typescript, but also will check that native code compiles (this can take some time). After both `test-ios` and `test-android` jobs succeed the `publish` job will be triggered.\n\n## Created with MRNP\n\n- [iyegoroff/react-native-multi-segmented-control](https://github.com/iyegoroff/react-native-multi-segmented-control)\n\nPackages that were bootstrapped with MRNP most likely will contain `Bootstrapped with make-react-native-package` string  marker in their `README.md` files, so they could be easily found with Github search.\n\n## Credits\n\n- `SwiftUI` component template is based on [this approach](https://github.com/Kureev/ReactNativeWithSwiftUITutorial) by @Kureev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyegoroff%2Fmake-react-native-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiyegoroff%2Fmake-react-native-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyegoroff%2Fmake-react-native-package/lists"}