BuildMaster Documentation

Building And Publishing Node.js Applications

  • Last Modified: 2019-07-17

You can use BuildMaster to build an app written in any language. That includes Node.js applications. BuildMaster allows you to build, test and deploy applications of any type using our intuitive interface or our integrated scripting language. You can build Node.js applications using tools such as Babel, Broccoli, Webpack, JSLint, TypeScript, and Grunt.

You can use BuildMaster to compile your Node.Js applications using tools such as Babel, Broccoli, Webpack, JSLint, TypeScript, Grunt, npm. etc.

Once you have chosen your compiler and ensured that it is installed on your build machine you'll probably want to create a module in BuildMaster that executes the command line for the tool and allows you to pass arguments. In the samples below we'll simply use npm.

Sample Module In OtterScript

module npm-cli<$args>
    set $ExeFileName = C:\Program Files\nodejs\npm.cmd;

        FileName: $ExeFileName,
        Arguments: $args

Get Source

At this point you start to create your build plan in BuildMaster. Which would include pulling your source code from any repository such as git, GitHub, GitLab, or TFS.

    Credentials: git-ProfitCalcJS,

Now you can call npm build by adding the npm-cli module to your build plan.


call npm-cli
    args: build

You can also accomplish this operation with InedoCore::Exec but you may want to call npm commands with different arguments so using a module is ideal for this scenario.

Deploy Artifact

The next step is to deploy your Node.Js application. You can create an artifact and move it to another environment within a deploy plan.

 Deploy-Artifact ProfitCalcJS;

Next Steps

You may also want to perform more advance task using your npm-cli module such as: npm publish or npm install. This can easily added to a deploy plan by adding simple otter scripts to it.

 call npm-cli
     args: install $WorkingDirectory

  call npm-cli
     args: publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]

Is this documentation incorrect or incomplete? Help us by contributing!

This documentation is licensed under CC-BY-SA-4.0 and stored in GitHub.

Generated from commit 7dbbedf1 on master