jaimecbernardo / rnw-modinit

rnw-modinit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rnw-modinit

Generate native modules project files (.vcxproj and .sln) for react-native-windows. Generated files contain project files suitable for autolinking and some base C++ code that helps you get started.

Module files are based on react-native-camera Windows module files.

Usage

node app.js ModuleName template
  • ModuleName will be used as the base for the filenames, the C++ namespace and the native module name. C++ identifiers rules apply.
  • template is the template used to generate the project files. Currently:
    • 0.61+ for RNW 0.61 and later
    • 0.62+ for RNW 0.62 and later

To generate a native module that will support RNW versions 0.61 and up:

node app.js RNModuleName 0.61+

To generate one that supports 0.62 and up:

node app.js RNModuleName 0.62+

The app will generate the project files in windows folder.

How it works

The tool will take all the files in the template folder, and change all occurrences of MODNAME in both the filenames and file content to the given ModuleName. It will also generate a GUID and replace all occurrences of MODGUID in the files with the generated one.

About

rnw-modinit

License:MIT License


Languages

Language:C++ 59.7%Language:JavaScript 33.1%Language:C 7.2%