Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

platformjs-cli

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

platformjs-cli

A simple command-line tool with git and npm convenience commands

  • 0.1.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

platformjs-cli

Installs a command pjs that includes convenience functions for working with git repositories, npm packages, and other common development scenarios.

Overview

Setup

$ pjs init			# Initialize a "root" development directory
$ source pjs-bash	# Let pjs interact with the bash environment

Common commands

$ pjs status		# Recursively run git status for each git
					# repo under the current directory and cd
					# to the first with any uncomitted diffs
$ pjs publish		# Tag, commit, push, and publish to NPM the
					# repository in the current directory
$ pjs cd <name>		# Change directory to the git repo under the
					# root that most closely matches "name"

Install & Setup

Installation

The pjs command is intended to be installed globally:

$ npm install -g platformjs-cli

Setup

To define a root directory as a development "home", the pjs init command can be used. This will define a .pjsconfig for that subtree and create a pjs-bash file to allow psj to interact with the bash environment. This only need to be run once in the directory.

$ pjs init

To allow pjs to interact with the bash environment (e.g. change the current working directoy) during a session, pjs-bash needs to be "source'd". This command needs to be run every session (or included in your bash profile):

$ source pjs-bash  

Commands

git batch commands

pjs home

Changes directory to your development "home" directory.

# Needs to be run once to allow pjs to interact with the
# the bash environment
$ source pjs-bash 

# Now becomes a shortcut to change directory to pjs "home"
# directory
$ psj home
pjs status

Recursively runs and reports the results of git status for the current directory and/or any sub-directories containing a .git folder.

pjs pushall

Recursively runs and reports the results of git pushall for the current directory and/or any sub-directories containing a .git folder.

miscellaneous

pjs publish

In the current working directory:

  1. Bumps the minor version number in package.json
  2. Commits the updated package.json to git
  3. Add a new tag of the form v#.#.# to git
  4. Pushes commit and tag to the default git remote
  5. Runs npm publish on the updated package

The command does some basic checks such as setting the version to 0.0.0 if the version has not yet been set, warning if there is no description field, aborting the publish is there are uncommitted changes in the working repo, etc.

FAQs

Package last updated on 12 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc