All Projects β†’ frostney β†’ React Native Create Library

frostney / React Native Create Library

Licence: mit
πŸ““ Command line tool to create a React Native library with a single command

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Create Library

Slim.js
Fast & Robust Front-End Micro-framework based on modern standards
Stars: ✭ 789 (-42.07%)
Mutual labels:  library, native
generator-omaha
Yeoman generator designed to help you craft sustainable code for the modern web
Stars: ✭ 12 (-99.12%)
Mutual labels:  native, scaffold
Tanya
GC-free, high-performance D library: Containers, networking, metaprogramming, memory management, utilities
Stars: ✭ 70 (-94.86%)
Mutual labels:  library, native
Node Window Manager
Manage windows in Windows, macOS and Linux using Node.js
Stars: ✭ 263 (-80.69%)
Mutual labels:  library, native
Angular Librarian
An Angular 2+ scaffolding setup for creating libraries
Stars: ✭ 92 (-93.25%)
Mutual labels:  library, scaffold
Ti.worker
Use Multi-Threading / Worker Threads in Appcelerator Titanium.
Stars: ✭ 95 (-93.02%)
Mutual labels:  native
React Native Navigation Drawer Extension
Drawer API built on top of wix react-native-navigation for iOS and Android (with TypeScript!)
Stars: ✭ 98 (-92.8%)
Mutual labels:  native
Simpledialogfragments
A collection of easy to use and extendable DialogFragment's for Android
Stars: ✭ 94 (-93.1%)
Mutual labels:  library
Zui
β¬’ Zsh User Interface library – CGI+DHTML-like rapid application development with Zsh
Stars: ✭ 95 (-93.02%)
Mutual labels:  library
Sunset.css
This library offers a collection of different CSS-powered transitions.
Stars: ✭ 99 (-92.73%)
Mutual labels:  library
React Markdown
Markdown editor (input) based on React
Stars: ✭ 98 (-92.8%)
Mutual labels:  library
Gowebdav
A golang WebDAV client library and command line tool.
Stars: ✭ 97 (-92.88%)
Mutual labels:  library
Fluid Slider Android
πŸ’§ A slider widget with a popup bubble displaying the precise value selected. Android library made by @Ramotion
Stars: ✭ 1,336 (-1.91%)
Mutual labels:  library
Transit Map
Generate a schematic map (β€œmetro map”) for a given (transit) network graph using Mixed Integer Programming.
Stars: ✭ 98 (-92.8%)
Mutual labels:  library
Chemfiles
Library for reading and writing chemistry files
Stars: ✭ 95 (-93.02%)
Mutual labels:  library
Geotic
Entity Component System library for javascript
Stars: ✭ 97 (-92.88%)
Mutual labels:  library
Fs extra
Expanding opportunities standard library std::fs and std::io
Stars: ✭ 95 (-93.02%)
Mutual labels:  library
Pdf Php
Official R&OS PHP Pdf repository
Stars: ✭ 97 (-92.88%)
Mutual labels:  native
Predicateflow
Write amazing, strong-typed and easy-to-read NSPredicate.
Stars: ✭ 98 (-92.8%)
Mutual labels:  library
Go Daemon
A library for writing system daemons in golang.
Stars: ✭ 1,341 (-1.54%)
Mutual labels:  library

react-native-create-library

Tool to create a React Native library with a single command.

Why might you need this?

If you are looking to create a native module for React Native, you need some native code for each platform you want to support and then some JavaScript code to bind it all together. Setting this up by yourself can be time-consuming.

This is where this tool comes in. It creates a boilerplate with all current best practices in mind. Why not use react-native new-library? Unfortunately that command doesn't create an up-to-date library, requires an already initialized React Native project and only sets up the iOS side of things.

Caution: This only creates native modules without a view component.

Alternatives

react-native-create-bridge

Installation

Requirements: Node 6.0+

$ npm install -g react-native-create-library

Command-line usage

Navigate into an empty directory to execute the command.

$ react-native-create-library MyFancyLibrary

This will create the folder MyFancyLibrary in which the library will be created in.

Now install dependencies by running this command in the newly created library.

$ npm install
Usage: react-native-create-library [options] <name>

Options:

  -h, --help                                output usage information
  -V, --version                             output the version number
  -p, --prefix <prefix>                     The prefix for the library (Default: `RN`)
  --module-prefix <modulePrefix>            The module prefix for the library (Default: `react-native`)
  --package-identifier <packageIdentifier>  (Android only!) The package name for the Android module (Default: `com.reactlibrary`)
  --namespace <namespace>                   (Windows only!) The namespace for the Windows module
   (Default: The name as PascalCase)
  --platforms <platforms>                   Platforms the library will be created for. (comma separated; default: `ios,android,windows`)
  --github-account <github_account>         The github account where the library is hosted (Default: `github_account`)
  --author-name <name>                      The author's name (Default: `Your Name`)
  --author-email <email>                    The author's email (Default: `[email protected]`)
  --license <license>                       The license type of this library (Default: `Apache-2.0`)
  --generate-example <shouldGenerate>       Will generate a RN example project and link the new library to it (Default: `false`)

Programmatic usage

const createLibrary = require('react-native-create-library');

createLibrary({
  name: 'MyFancyLibrary'
}).then(() => {
  console.log('Oh yay! My library has been created!');
})

Options

{
  name: String, /* The name of the library (Default: Library) */
  prefix: String, /* The prefix for the library (Default: RN) */
  modulePrefix: String, /* The module prefix for the library (Default: react-native) */
  platforms: Array, /* Platforms the library will be created for. (Default: ['ios', 'android', 'windows']) */
  packageIdentifier: String, /* (Android only!) The package name for the Android module (Default: com.reactlibrary) */
  namespace: String, /* (Windows only!) The namespace for the Windows module (Default: The package identifier as PascalCase, which is `Com.Reactlibrary`) */
  githubAccount: String, /* The github account where the library is hosted (Default: `github_account`) */
  authorName: String, /* The author's name (Default: `Your Name`) */
  authorEmail: String, /* The author's email (Default: `[email protected]`) */ 
  license: String, /* The license type of this library (Default: `Apache-2.0`) */
  generateExample: Boolean, /* Will generate a RN example project and link the new library to it (Default: `false`) */
}

Acknowledgements

react-native-share (https://github.com/EstebanFuentealba/react-native-share) has been a great source of inspiration for this project.

License

MIT

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