Parse and validate your modules
  • 17 Jul 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Parse and validate your modules

  • Dark
    Light
  • PDF

Article summary

Modules need to be valid before they can be made available on our Dashboard.

The parse command validates your modules for the following:

  • Module contains:

    • preview.png

    • meta.json file with a root property.

  • The screen modules root must:

    • start with /screens

    • have no dependencies

    • have a package.json file with a name that starts with @screens/

    • contain a default export in the index.js file

Run the following command to validate your modules:
       cb parse --source modules --verbose

Arguments

--source — Optional — Use this to specify a directory in which the modules are located for anything other than the demo app.

Required value: <path> — The relative path a different directory.

--verbose — Optional — Provides additional information to help you understand the command's execution and troubleshoot any issues. 

If any validation fails, we log the failure reason so that you can fix any issues and run the command again.
For example:

~/crowdbotics@modules $ cb parse --source modules

> Parsing modules... 

✅ azure-infra
✅ basiq-payments
❌ django-push-notifications => module preview image missing
❌ django-social-auth => module preview image missing
✅ screen-login
✅ terms-and-conditions

> Total of modules: 6


Was this article helpful?