All Projects → iyegoroff → make-react-native-package

iyegoroff / make-react-native-package

Licence: MIT license
CLI tool for bootstrapping react-native packages with Kotlin & Swift & Typescript

Programming Languages

kotlin
9241 projects
javascript
184084 projects - #8 most used programming language
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language
java
68154 projects - #9 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to make-react-native-package

Scout
Scout is a kotlin multiplatform application that allows users to search and save games to lists to be browsed later.
Stars: ✭ 28 (-22.22%)
Mutual labels:  swift-ui, jetpack-compose
SSJetpackComposeSwipeableView
SSJetpackComposeSwipeableView is a small library which provides support for the swipeable views. You can use this in your lazyColumns or can add a simple view which contains swipe to edit/delete functionality.
Stars: ✭ 57 (+58.33%)
Mutual labels:  jetpack-compose
PexWallpapers
Android application following best practices: Jetpack, Jetpack Compose, Modularity, Clean Architecture, Kotlin Coroutines, Tests, MVVM, DI, Static Analysis
Stars: ✭ 86 (+138.89%)
Mutual labels:  jetpack-compose
podcast-app
Podcast App
Stars: ✭ 291 (+708.33%)
Mutual labels:  jetpack-compose
Notflix
Kotlin Multiplatform playground
Stars: ✭ 272 (+655.56%)
Mutual labels:  jetpack-compose
Fractal-Trees
Fractal Trees 🌴 using recursion | Demonstrated using Jetpack Compose 🚀
Stars: ✭ 28 (-22.22%)
Mutual labels:  jetpack-compose
JetpackCompose.app
🚀 The best source on the interwebs for all things Jetpack Compose!
Stars: ✭ 72 (+100%)
Mutual labels:  jetpack-compose
swiftui-app-icon-creator
Create iOS and macOS application icon in Xcode with SwiftUI
Stars: ✭ 58 (+61.11%)
Mutual labels:  swift-ui
Android-Developer-Roadmap
Ruta de aprendizaje desde cero para convertirte en Android Developer
Stars: ✭ 350 (+872.22%)
Mutual labels:  jetpack-compose
MusicX
MusicX is a music player 🎵 android app built using Kotlin and Jetpack Compose. It follows M.A.D. practices and hence is a good learning resource for beginners
Stars: ✭ 85 (+136.11%)
Mutual labels:  jetpack-compose
Biometric-Authentication-Android
A sample implementation of AndroidX biometrics API using Kotlin. Authenticate using biometrics or PIN/Password if biometrics isn't available on device. Fully implemented in Jetpack compose using Material 3 dynamic theming and also has a separate implementation in xml with MDC 3.
Stars: ✭ 29 (-19.44%)
Mutual labels:  jetpack-compose
neon
Provides Jetpack Compose support for different image loading libraries.
Stars: ✭ 13 (-63.89%)
Mutual labels:  jetpack-compose
Einsen
🎯 Einsen is a prioritization app that uses Eisenhower matrix technique as workflow to prioritize a list of tasks & built to Demonstrate use of Jetpack Compose with Modern Android Architecture Components & MVVM Architecture.
Stars: ✭ 821 (+2180.56%)
Mutual labels:  jetpack-compose
UI-Swift
swift搭建UI
Stars: ✭ 30 (-16.67%)
Mutual labels:  swift-ui
compose-ratingbar
A ratingbar composable for jetpack compose 🚀🌟
Stars: ✭ 89 (+147.22%)
Mutual labels:  jetpack-compose
ComposeNotes
Notes app with full jetpack compose architecture (UI + navigation). Uses MVVM, Room, Kotlin Flows & LiveData
Stars: ✭ 32 (-11.11%)
Mutual labels:  jetpack-compose
Kuberam
Kuberam is built on jetpack compose + Auth0 during Hashnode Hackathon.
Stars: ✭ 33 (-8.33%)
Mutual labels:  jetpack-compose
permissions-ui
Background location permissions request helper
Stars: ✭ 53 (+47.22%)
Mutual labels:  jetpack-compose
resaca
The right scope for View Models in Android Compose
Stars: ✭ 105 (+191.67%)
Mutual labels:  jetpack-compose
GitMessengerBot-Android
타입스크립트, V8 엔진의 자바스크립트, 파이썬 그리고 Git을 지원하는 최첨단 메신저 봇!
Stars: ✭ 51 (+41.67%)
Mutual labels:  jetpack-compose

make-react-native-package

npm version CircleCI js-standard-style Dependency Status devDependencies Status npm

CLI tool for bootstrapping react-native packages with Kotlin & Swift & Typescript

About

  • CLI tool:
    • single command to scaffold a monorepo with package itself and ready-to-run example app
    • can create any amount of dummy native components and modules inside same package
    • has multiple component templates
    • versioning doesn't follow 'semver', major and minor numbers match the ones from specific version of react‑native whose project template is used by MRNP
  • Bootstrapped package:
    • supports iOS & Android & react-native ">= 0.60.0"
    • contains (absolutely optional) basic CI setup: CircleCI -> lint & build -> npm
    • has setup instructions for package end-users in generated README.md files
    • includes a Dockerfile for creating a release example .apk in 'neutral' environment

Getting started

$ npx make-react-native-package -p react-native-cool-component --githubUsername cool-github-user

Usage guide

$ npx make-react-native-package --help
Usage

  $ make-react-native-package <--packageName name> <--githubUsername user> ...

Required options

  -p, --packageName string      The name of project folder, github repo and npm package
  -g, --githubUsername string   Your github username

Options

  -h, --help                   Print this usage guide
  -a, --appName string         Example app name
  -o, --objcPrefix string      Objective-C file prefix
  -c, --components string[]    List of space-separated native component names
  -m, --modules string[]       List of space-separated native module names
  -d, --description string     Package description
  -n, --npmUsername string     Your npm username
  -e, --email string           Your npm email
  -w, --withoutConfirmation    Skip confirmation prompt
  -s, --skipInstall            Skip dependency installation
  -t, --templates string[]     List of space-separated component templates:
                               ios:default - default Swift template
                               android:default - default Kotlin template
                               ios:swift-ui - SwiftUI component template
                               android:jetpack-compose - Jetpack Compose component template
                               ios:component-kit - ComponentKit Objective-C++ component template
                               android:litho - Litho Kotlin component template

Example

  $ make-react-native-package --packageName react-native-cool-component
    --githubUsername octocat --appName CoolExample --objcPrefix RNCC
    --description "Cool description" --npmUsername wombat --email [email protected]
    --templates ios:swift-ui android:jetpack-compose

Workflow

Installation

Usually no additional steps required after bootstrapping a package. However, if you have skipped dependency installation with --skipInstall option you can setup everything later by running npm run init:package from package root folder.

Development

Generated folder contains the package itself in the root and the sample app inside ./example folder. Example 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.

To watch on Typescript sources changes you have to run npm run watch commands from both 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.

To open a project in Xcode go to ./example/ios folder and open .xcworkspace file, package Swift sources should be found inside Pods > Development Pods > {{packageName}} group in project navigator.

To 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}} > java group in project tool window.

To build native code and run sample app on device/simulator just use standard react-native 'run' commands or 'run' buttons from Xcode/Android Studio.

Publishing

There are two options: publishing from local machine or publishing from CircleCI.

To publish from a local machine just run npm version <your_package_next_version> && 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.

If 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 (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 or imported from your other CircleCI project. When everything is ready run npm version <your_package_next_version> -m "%s [skip ci]" to initiate just publish job on CircleCI without triggering surplus test-ios & 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.

Created with MRNP

Packages 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.

Credits

  • SwiftUI component template is based on this approach by @Kureev
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].