Skip to content

Add the ability to sync npm scripts #24

@zephraph

Description

@zephraph

Introduce an argument --update-scripts to write all the maid tasks to the package.json file.

So ## clean -> "scripts: { "clean": "maid clean" }

This will allow users to use yarn clean or npm run clean as they may likely already be doing, but having the source of truth be their maid file. I envision that the --update-scripts arg would be used with something like lint-staged to automatically update the scripts when there were changes. It would only update the scripts whose commands start with maid.

One issue with this approach is the pre, post task hooks that maid supports. These would suddenly be ran twice. Will need to figure out a solution for that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions