0.6.0 • Published 2 years ago

pliz v0.6.0

Weekly downloads
14
License
MIT
Repository
github
Last release
2 years ago

Actions Status NPM Version

Pliz is a cli tool that invokes JS functions (typically development, build, or deploy tasks).


Pliz can be supercharged with Google's zx for more shell power.

So when calling:

pliz bump minor

This function will be called:

// plizers.js
import { $ } from 'zx';

export async function bump([versionType]) {
  await $`npm version ${versionType}`;
  await $`git push`;
  await $`git push --tags`;
}

Rationale

Modern Javascript projects involve a multitude of development tasks. Typically these live in:

  • package.json script commands, possible issues with which:
    • shell rather than JS
    • no comments
    • sometimes require extra dependencies (eg, cross-env)
    • parametrisation can be tricky
  • scripts folder
    • onboarding and discoverability may be sub-optimal
  • Our heads
    • What's the command to kill a process? Do everyone remember -9? What about Windows?
    • What's the command to enter a docker image interactive shell again?

Pliz reduces the team's cognitive load by offering a single source of truth to all these.

Quick Start

1. Install

npm i -g pliz

2. Create plizers

Create the following plizers.js file (or plizers/index.js) in your project root:

const say = ([text]) => {
  console.log(`${text}!`);
};

module.exports = {
  say,
};

pliz.config.js:

require('@babel/register')({
  presets: [
    [
      '@babel/preset-env',
      {
        targets: { node: 'current' },
      },
    ],
  ],
});

plizers.js:

export const say = ([text]) => {
  console.log(`${text}!`);
};

3. Use

In your shell:

pliz say Hello
0.6.0

2 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago