npm install --save-dev octopus-start-preset-modules
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());
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
a
with version1.0.0
and another moduleb
depends on it, but depends on different version (ex.~1.0.1
), then modulesb
dependencies will be updated to match that of modulea
declared 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}
Returns a function that you can bind to exports
and that will simply print discovered modules.
Returns a function that you can bind to exports
and that will simply print discovered modules.