0.0.8 • Published 6 years ago

memi v0.0.8

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

MEMI

NPM

Simple task-runner with JavaScript.

MEMI is simple task-runner, inspired by mimorisuzuko/memi.

  • Write tasks with JavaScript
  • Auto install dependencies

Install

npm i -g memi
# When you install via yarn, you should install `npm` too.
yarn global add npm memi

Usage

  1. Put Memifile on working directory
    • MEMI loads Memifile named as below
      • Memifile / .memifile
      • Memifile.{js,mjs} / .memifile.{js,mjs}
  2. Write task functions as module

    • See example

      import inquirer from 'inquirer';
      import cowsay from 'cowsay';
      
      export default {
        async start() {
          const { text } = await inquirer.prompt([
            {
              name: 'text',
              message: "How's it going?",
            },
          ]);
          this.echo(text);
        },
        echo(text = 'Hello Memi!') {
          console.log(cowsay.say({ text }));
        },
      };
  3. Run task

    memi <taskname> [<args>...]

Tips: Useful libraries when you write tasks

  • execa - npm
    • A better child_process
  • fs-extra - npm
    • Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
  • shelljs - npm
    • Portable Unix shell commands for Node.js
  • simple-git - npm
    • A light weight interface for running git commands in any node.js application.
  • glob - npm
    • Match files using the patterns the shell uses, like stars and stuff.
  • opn - npm
    • A better node-open. Opens stuff like websites, files, executables. Cross-platform.
  • inquirer - npm
    • A collection of common interactive command line user interfaces.

Note

  • Auto-installed dependencies are in $HOME/.memi/node_modules.
    • For Windows: %USERPROFILE%\.memi\node_modules.

Contribute

PRs accepted.

What's MEMI?

MEMI have been named after Memi Kakizaki (柿崎芽実).

License

MIT © 3846masa

Buy Me A Coffee

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

1.0.0

8 years ago