UNPKG

auto-dist-tag

Version:

Automatically rewrites the publishConfig.tag setting in your package.json file for you

27 lines (20 loc) 438 B
#!/usr/bin/env node 'use strict'; const meow = require('meow'); const autoDistTag = require('./src/auto-dist-tag'); const cli = meow(` Usage $ auto-dist-tag [path] Options --write, -w Write calculated dist-tag to the package.json file `, { flags: { write: { type: 'boolean', alias: 'w' } } }); let cwd = cli.input[0] || process.cwd(); autoDistTag(cwd, cli.flags) .then(json => console.log(json));