0.0.4 • Published 7 years ago
octopus-start-modules v0.0.4
octopus-start-modules
install
npm install --save-dev octopus-start-modules
Usage
const {sync, where, list} = require('octopus-start-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
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}
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.