octopus-start-preset-modules
v0.0.4
Published
tasks for start that adds module management support
Readme
octopus-start-preset-modules 
install
npm install --save-dev octopus-start-preset-modulesUsage
const {sync, where, list} = require('octopus-start-preset-modules'),
Start = require('start');
const start = new Start();
module.exports['modules:sync'] = start(sync());
module.exports['modules:where'] = start(where());
module.exports['modules:list'] = start(list());API
sync(mutateVersion: version => version)
Returns a function that you can bind to exports and that will sync modules across multi-module repo. Syncing modules means:
- if you have module
awith version1.0.0and another modulebdepends on it, but depends on different version (ex.~1.0.1), then modulesbdependencies will be updated to match that of moduleadeclared version.
Parameters:
- mutateVersion - if you want ex. version to be synced to some special semver expression(~) you can do
version =>^${version}. Defaults to `version => `~${version}
list()
Returns a function that you can bind to exports and that will simply print discovered modules.
where()
Returns a function that you can bind to exports and that will simply print discovered modules.
