This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@flex-development/dtag
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

dtag

conventional commits code style: prettier npm license typescript

Distribution tag lookup utility for Node.js and CLI environments.

Install

yarn add @flex-development/dtag

GitHub Package Registry

To install from the GitHub Package Registry, setup a .npmrc or .yarnrc.yml file to authenticate with the registry. A Personal Access Token with at least the read:packages scope is required.

.npmrc

//npm.pkg.github.com/:_authToken=${GH_PAT}
@flex-development:registry=https://npm.pkg.github.com/

.yarnrc.yml

npmRegistries:
  //npm.pkg.github.com:
    npmAlwaysAuth: true
    npmAuthToken: ${GH_PAT}

npmScopes:
  flex-development:
    npmRegistryServer: https://npm.pkg.github.com

Git

For details on requesting a specific branch, commit, or tag, see npm-install or Git - Protocols | Yarn.

NPM

npm i flex-development/dtag

Yarn

yarn add @flex-development/dtag@flex-development/dtag

Usage

CLI

Usage
  $ dtag [target] [options]

Options
  -d, --delimiter Lookup target separator
  -v, --version Displays current version
  -h, --help Displays this message

Examples
  $ dtag                                                 # ''
  $ dtag 2.0.0                                           # ''
  $ dtag 2.0.0-alpha.1                                   # 'alpha'
  $ dtag foo-package@2.0.0-beta.1 --delimiter @          # 'beta'
  $ dtag $(git describe --tags --abbrev=0) -d @          # depends on the tag 😉

If you installed dtag locally, you may need to update your PATH:

[ -d $PWD/node_modules/.bin ] && export PATH=$PWD/node_modules/.bin:$PATH

Node.js

import dtag from '@flex-development/dtag'

console.log(dtag()) // ''
console.log(dtag({ target: '2.0.0' })) // ''
console.log(dtag({ target: '2.0.0-alpha.1' })) // 'alpha'
console.log(dtag({ delimiter: '@', target: 'foo-package@2.0.0-beta.1' })) // 'beta'

Options can be viewed here.

Readme

Keywords

Package Sidebar

Install

npm i @flex-development/dtag

Weekly Downloads

0

Version

2.0.0

License

BSD-3-Clause

Unpacked Size

43 kB

Total Files

35

Last publish

Collaborators

  • unicornware