- Generate modules data
- Get module info
- Create a local demo app
- Install a module
- Remove a module
- Generate cookiecutter
- Bootstrap
- Update React Native base template
- Lint modules
yarn run parse
Run the command to validate, parse and export the modules source code into a JSON file.
Example output:
~/code/github.com/crowdbotics@modules (hotfix/login-screen-export) $ yarn parse
yarn run v1.22.10
$ node scripts/parse.js
Parsing modules...
✅ camera
✅ django-articles
❌ django-push-notifications => module preview image missing
❌ django-social-auth => module preview image missing
✅ payments
✅ privacy-policy
✅ react-native-app-menu
✅ react-native-articles
✅ react-native-chat
✅ react-native-login
✅ react-native-maps
✅ react-native-onboarding
❌ react-native-push-notifications => module preview image missing
❌ react-native-social-login => module preview image missing
✅ react-native-splash
✅ react-native-user-profile
✅ screen-login
✅ terms-and-conditions
Total of modules: 18
Done in 0.27s.
yarn run info <module_type> <module_name>
Prints the module name, description and the respective data JSON.
Supported module types:
- "django"
- "react-native"
yarn run demo
This command runs npx react-native init
with --template
pointing to our own Custom React Native template.
yarn run add [<module_name>]
Installs a list of modules into the demo app, performing the follow operations:
- Copies the module directory from react-native into
demo/modules
. - Runs
yarn add <module_name>
in thedemo
directory. - Runs
yarn add <dependency>
for everyx-dependencies
in the modulepackage.json
.
yarn run remove [<module_name>]
Removes a list of modules from the demo app, performing the follow operations:
- Removes the module folder from
demo/modules
. - Runs
yarn remove <module_name>
in thedemo
directory. - Runs
yarn remove <dependency>
for everyx-dependencies
in the modulepackage.json
.
Start by generating a new app called ProjectName
to serve as input for cookiecutter replacements:
yarn run raw
Then run the cookie command to generate distribution cookiecutter.
yarn run cookie
Generates cookiecutter template by replacing according to the following translation table:
Before | After | Example |
---|---|---|
ProjectName |
{{ cookiecutter.project_slug }} |
MyNewApp |
projectname |
{{ cookiecutter.project_dash_slug }} |
mynewapp |
ProjectNameIdentifier |
{{ cookiecutter.project_dash_slug }} |
mynewapp |
ProjectOwnerEmail |
{{ cookiecutter.owner_email }} |
[email protected] |
ProjectSSHKeyFingerPrint |
{{ cookiecutter.ssh_key_fingerprint }} |
abc:123 |
Ouput will be made to dist/cookie.
yarn run bootstrap
Runs demo
, raw
, cookie
, and parse
commands.
yarn run template
Updates the react-native template from upstream, from the locally resolved version (currently pinned to 0.64.2).
Lint modules source code with a pre-configured ESLint setup:
yarn lint
This is helpful during the development of a module - you make changes to the demo directory on a specific module and when you finish you can copy the code from demo/modules/[<module_name>]
and demo/backend/modules/[<module_name>]
to the main modules directory modules/[<module_name>]
Run the following command:
yarn run commit-module [<module_name>]