1.0.3 • Published 10 months ago

@ehmpathy/as-command v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

as-command

test publish

Easily create commands within a pit of success

install

npm install as-command

use

for example

import { asCommand } from 'as-command';
import { getResourceNameFromFileName } from 'visualogic';
import { stage } from '../../../utils/environment';
import { log } from '../../../utils/logger';
import { COMMANDS_OUTPUT_DIRECTORY } from '../__tmp__/directory';

const command = asCommand(
  {
    name: getResourceNameFromFileName(__filename),
    stage: stage,
    dir: COMMANDS_OUTPUT_DIRECTORY,
    log,
  },
  async () => {
    // your logic
  }
);

// STAGE=test npx tsx src/contract/commands/yourLogic.ts
if (require.main === module) void command({});
1.0.3

10 months ago

1.0.2

12 months ago

1.0.1

1 year ago