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

Spawn another lifecycle event #57

Closed
texastoland opened this issue Jul 25, 2018 · 2 comments
Closed

Spawn another lifecycle event #57

texastoland opened this issue Jul 25, 2018 · 2 comments

Comments

@texastoland
Copy link
Contributor

texastoland commented Jul 25, 2018

I previously had prebuild: yarn test but I need to avoid {pre,post}* hooks. My new build script is:

#!/bin/bash
set -eu
runner=${npm_config_user_agent%%/*} # npm or yarn
$runner run test                    # or scripty test
parcel build src/index.html

Is there a simpler way to do what I want? Ideally I'd rather write scripty test and be done with it. Do you see any reason it wouldn't make sense to allow the lifecycle event to be overriden in a child script? Or better to consider #35 (ordered scripts) or #43 (set runner in a before hook)?

@searls
Copy link
Member

searls commented Jul 26, 2018

I'm honestly open to both #35 & #43, I just haven't been using/maintaining scripty much. I'm unsure what other prescription you're intimating above, but if you can explain that I'm happy to consider it (I see you opened some other issues but this is the first I'm looking at)

@texastoland
Copy link
Contributor Author

texastoland commented Jul 26, 2018

I'll PR today separate from #35 and #58. I want to change the CLI to allow scripty test SCRIPTY_TARGET=test scripty if and only if Scripty is already running. Then you can delegate to another script without npm/yarn run.

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