1build init --name <your_project_name>
1build.yamlproject: Sample JVM Project Namecommands:- build: npm run build- test: npm run test
1build lint test
1build set lint "eslint server.js"
1build unset lint
1build unset lint test build
Unset will log missing commands
Consider that your project requires some environment variables to set before running any commands and you want to clean up those after running commands. It is a headache to always remember to set those environment variables. What you want is to set env variables automatically when you run the command in the project and remove those when the command is complete. Another example – a project requires
Docker to be up and running or you need to clean up the database after running a test harness.
This is where
after commands are useful. These commands are both optional – you can use one of them, both or neither.
Setting env variables and cleaning those up
1build.yamlproject: Sample JVM Project Namebefore: export VARNAME="my value"after: unset VARNAMEcommands:- build: npm run build
Docker is up and running
1build.yamlproject: Containerized Projectbefore: ./docker_run.shcommands:- build: npm run build
Clean up database after some commands
1build.yamlproject: Containerized Projectafter: ./clean_database.shcommands:- build: npm run build