1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28#!/usr/bin/env node 'use strict'; import meow from 'meow'; import autoDistTag from './src/auto-dist-tag.js'; const cli = meow(` Usage $ auto-dist-tag [path] Options --write, -w Write calculated dist-tag to the package.json file `, { importMeta: import.meta, flags: { write: { type: 'boolean', alias: 'w' } } }); let cwd = cli.input[0] || process.cwd(); autoDistTag(cwd, cli.flags) .then(json => console.log(json));