Commands
Learn about the three main commands and how you will use them in the build tool.
To build and deploy your game templates, you will mainly use three commands: nobot setup
, nobot template
, and nobot game
. Here, have a look at the script for each of these three commands.
Setup
You will include the setup scripts: deployment.js
and templates.js
, which were discussed in the previous lesson, and invoke them.
Press + to interact
const setupDeployment = require('../setup/deployment');const setupTemplates = require('../setup/templates');const setup = () => {setupDeployment();setupTemplates();};module.exports = setup;
When you will run:
$ nobot setup // running setup command
it will call both the deployment
and template
setup scripts, so that all of your repositories are readied for the game release process.
Template
This command is a bit more involved. You will step through each code block, starting with the imported modules.
const fse = require('fs-extra');
const { join } = require('path');
const templatesPath = require('../helpers/get-templates-path');
const deployCorePath = require('../helpers/get-deploy-core-path');
const buildTemplate = require('../helpers/build-template');
const updateTemplate = require('../helpers/update-template');
const log = require('../helpers/log');
const readlineSync = require('readline-sync');
const { SUCCESS, ERROR } = require('../constants/log-levels');
const { NO_CHOICE_MADE } = require('../constants/common');
const deployTemplate = require('../helpers/deploy-template');
fs-extra
is being used