Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to sync npm scripts #24

Open
zephraph opened this issue Jun 3, 2018 · 1 comment
Open

Add the ability to sync npm scripts #24

zephraph opened this issue Jun 3, 2018 · 1 comment

Comments

@zephraph
Copy link
Contributor

zephraph commented Jun 3, 2018

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.

@tunnckoCore
Copy link
Contributor

tunnckoCore commented Jun 3, 2018

Probably --sync is better? But yea, i'm 👍 on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants