Skip to content

๐Ÿ— Development

๐Ÿค– Task

Task is used to automate tasks.

Note

Task needs to be executed in the root of libbash repo.

โœจ Creating a New Library

task new-lib LIB=mynewlib

Note

The new-lib task creates a lib, example, and doc file.

cp ./templates/lib.tmpl ./mynewlib

๐Ÿ“„ Templates

Template files exist to make it easier to create new files. Template files end with the tmpl file extension.

๐Ÿงฉ Examples

Example scripts exist to demonstrate how to use the libraries and functions

Note

Example scripts need to be ran inside of the examples directory.

Example
libbash/examples$ ./logging.sh

๐Ÿงช Unit Tests

bats-core is used to automate the testing of the libraries.

Run all tests
task test
Run a single test
task test-lib LIB=logging
Run all tests
./test/bats/bin/bats --tap test
Run a single test
./test/bats/bin/bats ./test/logging.bats