### Setting up Modus CLI for Contribution (Bash) Source: https://github.com/hypermodeinc/modus/blob/main/cli/README.md Installs project dependencies using npm and starts the watch process for development, allowing changes to be tested locally. ```bash npm i npm run watch ``` -------------------------------- ### Installing Modus Manifest Library (sh) Source: https://github.com/hypermodeinc/modus/blob/main/lib/README.md This command uses the `go get` tool to fetch and install or update the `manifest` shared library from the Modus GitHub repository. The `-u` flag ensures that the package and its dependencies are updated to the latest versions. ```sh go get -u github.com/hypermodeinc/modus/lib/manifest ``` -------------------------------- ### Initializing a New Modus App Source: https://github.com/hypermodeinc/modus/blob/main/README.md This command utilizes the Modus CLI to create a new Modus application project with a default structure and configuration, providing a starting point for development. ```Bash modus new ``` -------------------------------- ### Installing the Modus CLI Source: https://github.com/hypermodeinc/modus/blob/main/README.md This command uses npm to install the Modus command-line interface globally. The CLI is essential for initializing, developing, and managing Modus applications. ```Bash npm install -g @hypermode/modus-cli ``` -------------------------------- ### Running a Modus App Locally Source: https://github.com/hypermodeinc/modus/blob/main/README.md This command starts the local development server for a Modus application using the CLI. It typically includes features like fast refresh for efficient development. ```Bash modus dev ``` -------------------------------- ### Running Go Unit Tests Source: https://github.com/hypermodeinc/modus/blob/main/CONTRIBUTING.md This command executes all Go unit tests within the current module and its subdirectories. It is used to verify code changes before opening a pull request. ```Bash go test ./... ``` -------------------------------- ### Defining a Simple Function in AssemblyScript Source: https://github.com/hypermodeinc/modus/blob/main/README.md This snippet shows a basic function definition in AssemblyScript. Functions like this are the building blocks of Modus applications, which the framework then compiles and exposes. ```AssemblyScript export function sayHello(name: string): string { return `Hello, ${name}!`; } ``` -------------------------------- ### Configuring AssemblyScript Transforms in asconfig.json Source: https://github.com/hypermodeinc/modus/blob/main/sdk/assemblyscript/CHANGELOG.md This JSON snippet shows how to configure the `asconfig.json` file to include necessary transforms for the Hypermode Functions library. Adding `@hypermode/functions-as/transform` is required to enable metadata inclusion during the build process. ```JSON "options": { "transform": [ "@hypermode/functions-as/transform", "json-as/transform" ], "exportRuntime": true } ``` -------------------------------- ### Querying a Modus Function via GraphQL Source: https://github.com/hypermodeinc/modus/blob/main/README.md This GraphQL query demonstrates how to invoke a function, specifically the 'sayHello' function, within a Modus application endpoint. It passes a string argument 'name' to the function. ```GraphQL query SayHello { sayHello(name: "World") } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.