.asserted directory

The directory within your repo that holds all routine-related code and config

Initialization

To create a new routine and it's .asserted directory within a repo, go to the repo and run asrtd init using the CLI.

This will walk you through a few configuration options, and then create the directory, create the routine, and install the dependencies.

Structure and Files

A newly initialized .asserted directory will contain the following:

examples/      # A directory containing example tests
node_modules/  # Packges installed based on the package.json
.gitignore     # A standard Node .gitignore file
package.json      # Mostly standard package.json file
package-lock.json # Lockfile for packages
routine.json   # Routine configuration file

The examples can be removed or altered in any way, but the rest are required.

The routine.json file should be updated if you want to change anything about the routine configuration. That's covered here.

Any additional files you wish to create can be added to this directory and they will be included with the routine when it's pushed.

For the more technical people, a modified npm pack is used under the hood to collect and package routine-related files. As such, the same configuration options apply (the files: [] property in package.json, .npmignore, etc).

However, the pack-related npm lifecycle scripts are ignored.

Last updated