@sepalang/myself

0.3.0 • Public • Published

CircleCI Codacy Badge Greenkeeper badge

myself

  • Run the npm bin of the self project with a simple cli
  • Can check the information about package setting and execution.

compatibility

  • Unix compatible system
  • Only execute node yet

Install

npm install --save-dev @sepalang/myself 

Usage

package run script

In package.json

bin/myargv.js

#!/usr/bin/env node
console.log(`🎙️  This is your argv ${ JSON.stringify(process.argv) }`)

package.json

{
  "bin":{
    "argv":"bin/myargv.js"
  },
  "scripts":{
    "test":"my argv Hello world!"
  }
}

In shell

+ npm run test
🚀 Execute mybin : myargv Hello world
🎙️  This is your argv ["/Users/user/.nvm/versions/node/v8.9.4/bin/node","/Users/user/mybin/bin/myargv.js","Hello","world"]

information about package

const myself = require('myself')
console.log(myself)
/*
{
  "argv": [
    "/Users/naver/.nvm/versions/node/v8.9.4/bin/node",
    "/Users/naver/git/mybin/bin/mypkg.js",
    "Hello",
    "world"
  ],
  "argv2": [
    "Hello",
    "world"
  ],
  "args": {
    "_": [
      "Hello",
      "world"
    ]
  },
  "name": "myself",
  "directory": "mybin",
  "deployPath": "/Users/user/git",
  "path": "/Users/user/git/mybin",
  "package": {
    "name": "myself",
    "version": "0.2.0",
  ...
*/

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.00latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.00
0.2.30
0.2.20
0.2.10

Package Sidebar

Install

npm i @sepalang/myself

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

8.22 kB

Total Files

10

Last publish

Collaborators

  • hojung