Dolittle Documentation

Gulp Tasks

The build package centralizes the logic related to processing the packages, essentially building, testing and cleaning, removing the need for the developer to configure their own tasks and scripts. To do this we use Gulp to create custom and generalized tasks that can be used across any TypeScript application.

There are two ways to utilize these features. Firstly you can either have your own ‘Gulpfile.js’ file in the root of your project that looks like this:

Gulpfile.js (This file is optional)

const build = require('@dolittle/');
// export additional tasks...

Then you would need to have a couple of scripts in your package.json (all you package.json files if you’re using yarn workspaces) depending on whether or not you decided to have your own Gulpfile or not:

If you don’t have your own Gulpfile.js

  "scripts": {
    "tasks": "gulp --tasks --gulpfile node_modules/@dolittle/",
    "clean": "gulp clean --gulpfile node_modules/@dolittle/",
    "build": "gulp build --gulpfile node_modules/@dolittle/",
    "test": "gulp test --gulpfile node_modules/@dolittle/",
    "test:run": "gulp test-run --gulpfile node_modules/@dolittle/",
    "test:clean": "gulp test-clean --gulpfile node_modules/@dolittle/"

and if you have your own Gulpfile.js

  "scripts": {
    "tasks": "gulp --tasks",
    "clean": "gulp clean",
    "build": "gulp build",
    "test": "gulp test",
    "test:run": "gulp test-run",
    "test:clean": "gulp test-clean"
You don’t need to have all these scripts, unless you’re using the Dolittle Azure DevOps pipeline for TypeScript then you need all of these with those exact names.
–gulpfile must point to the Gulpfile.js file in the @dolittle/ package.