### Initial Project Setup Source: https://github.com/caffeinelabs/motoko-base/blob/master/README.md Commands to set up your local development branch for the Motoko base library for the first time. ```sh # First-time setup git clone https://github.com/caffeinelabs/motoko-base cd motoko-base npm install ``` -------------------------------- ### Motoko Module Import Example Source: https://github.com/caffeinelabs/motoko-base/blob/master/README.md Example of how the package name 'base' is used when importing modules in Motoko. ```motoko import "mo:base/Nat" ``` -------------------------------- ### Run Specific Test Files Source: https://github.com/caffeinelabs/motoko-base/blob/master/README.md Filter and run specific test files using npm test with a filter argument. For example, 'list' will run List.test.mo and AssocList.test.mo. ```sh npm test ``` -------------------------------- ### Generate Documentation Source: https://github.com/caffeinelabs/motoko-base/blob/master/README.md Run the documentation generation script to create HTML documentation in the doc/ directory. ```sh ./make_docs.sh ``` -------------------------------- ### Import and Use Debug Module in Motoko Source: https://github.com/caffeinelabs/motoko-base/blob/master/doc/modules/base-libraries/pages/stdlib-intro.adoc Demonstrates importing the Debug module from the base library using an 'mo:' URL and printing a message. ```motoko import Debug "mo:base/Debug"; Debug.print("hello world"); ``` -------------------------------- ### Run All Tests Source: https://github.com/caffeinelabs/motoko-base/blob/master/README.md Execute all tests for the Motoko base library using npm. ```sh # Run tests npm test ``` -------------------------------- ### Format Code Source: https://github.com/caffeinelabs/motoko-base/blob/master/README.md Run the code formatter for the Motoko base library using npm. ```sh # Run formatter npm run prettier:format ``` -------------------------------- ### Import Local Module in Motoko Source: https://github.com/caffeinelabs/motoko-base/blob/master/doc/modules/base-libraries/pages/stdlib-intro.adoc Shows how to import a local Motoko module named 'types' using a relative path. ```motoko import Types "./types"; ``` -------------------------------- ### Run All Tests in WASI Mode Source: https://github.com/caffeinelabs/motoko-base/blob/master/README.md Run all tests for the Motoko base library specifically in WASI mode using npm. ```sh # Run all tests in wasi mode npm test -- --mode wasi ``` -------------------------------- ### Add Base Package with Vessel Source: https://github.com/caffeinelabs/motoko-base/blob/master/README.md Add this entry to your package-set.dhall file if using the Vessel package manager and base is not included or needs overriding. ```dhall { name = "base", repo = "https://github.com/caffeinelabs/motoko-base", version = "master", dependencies = [] : List Text } ``` -------------------------------- ### Add Base Package with Mops Source: https://github.com/caffeinelabs/motoko-base/blob/master/README.md Use this command to add the base package to your project when using the Mops package manager. ```sh mops add base ``` -------------------------------- ### Run Tests in Watch Mode Source: https://github.com/caffeinelabs/motoko-base/blob/master/README.md Execute tests in watch mode using npm test. This is useful for development when writing tests, and can be combined with a filter. ```sh # Run tests in watch mode npm test -- --watch # useful to combine with filter when writing tests npm test array -- --watch ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.