• Adds a script entry to package.json If there is an existing script with the same name, it will be overwritten.

    Parameters

    • name: string

      the name of the script

    • command: string

      the command to run

    • Optional cwd: string

      override the working directory

    Returns Promise<void>

    Example

    import { packageJson } from 'ember-apply';

    await packageJson.addScript('say:hi', 'echo "hi"');