npm install --save-dev octopus-start-modules-tasks
const {modules, iter} = require('octopus-start-modules-tasks'),
Start = require('start');
const start = new Start();
//will list and print all tasks
module.exports.listAll = () => Start(modules.load(), iter.forEach()(() => {}));
Wraps octopus-modules
(../modules#modules) as a Start
task.
Removes modules from list returned ex. by modules.load()
that were not changed after last module.markBuilt
.
Parameters:
- label - custom label where you can have several groups of built/unbuilt modules and have built/unbuilt for separate tasks/groups of tasks.
Removes modules from the list returned by modules.load()
, that do not have changes (when compared to refspec
- branch), and aren't dependent on any of the modules, that do have changes.
Removes dependencies in modules that are left after removeUnchanged
or removeGitUnchanged
. In some cases you might want for dependencies to stay (npm links) and in others you want them to be removed.
Marks module as built.
Parameters:
- label - custom label where you can have several groups of built/unbuilt modules and have built/unbuilt for separate tasks/groups of tasks.
Marks module as unbuilt.
Parameters:
- label - custom label where you can have several groups of built/unbuilt modules and have built/unbuilt for separate tasks/groups of tasks.
Start
tasks that allows to iterate over result of modules.list
.
Supports options:
- mapInput, defaults to input => input: function that, given input other than array of modules - ex. object that contains modules, actually maps it to array of modules;
- silent, defaults to false: should task print iteration info.
Tasks returns provided input.
Start
tasks that allows to iterate over result of asynchronously modules.load
.
Supports options:
- mapInput, defaults to input => input: function that, given input other than array of modules - ex. object that contains modules, actually maps it to array of modules;
- silent, defaults to false: should task print iteration info;
- threads, defaults to 4: number of parallel threads.
Tasks returns provided input.
Start
tasks that reads json file in cwd of provided module. Returns json object;
Start
tasks that deep overrides properties of object in input with ones defined in overrides. Calls cb
on override event with object:
- key;
- currentValue;
- newValue.
Returns merged json;
Start
tasks that writes input json to cwd of provided module. Returns json object;