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

Support for sequential scripts #50

Closed
sean-clarke opened this issue May 24, 2020 · 4 comments · Fixed by #80
Closed

Support for sequential scripts #50

sean-clarke opened this issue May 24, 2020 · 4 comments · Fixed by #80
Labels
enhancement New feature or request
Milestone

Comments

@sean-clarke
Copy link

I am using denon inside a Docker container build with the hayd deno image and would like to support file watching/restart that rebundles my client scripts then runs server.ts... however, I don't believe I am able to do this without passing multiple cmds into my denon.json script... If I use multiple scripts, denon hangs on the first one called, and if I pre bundle, then I am only getting file watching/restart on my server-side code.

@notfilippo
Copy link
Collaborator

Correct me if I am wrong but you are basically asking for parallel daemonized processes support? This could actually be a very useful feature. Something like:

{
  "scripts": {
    "run": ["first command", "second command"]
  }
}

that can be run with denon run would suit your needs?

@notfilippo notfilippo added the enhancement New feature or request label May 24, 2020
@notfilippo notfilippo added this to the 2.1.0 milestone May 25, 2020
@notfilippo notfilippo modified the milestones: 2.1.0, 2.2.0 Jun 5, 2020
@ManuelRauber
Copy link

AFAIK && is not to let something run in parallel in bash, but in sequential. That's how I've normally done my node.js scripts, when to deploy something:

As an example:

"scripts": {
  "deploy": "cp config.ts dist.config.ts && cp README.md dist/README.md && tsc"
}

If you wanted to run something in parallel, you could use concurrently in Node.js (do we need a concurrently in Deno? :-))

I'd rather prefer to have a sequential support in denon rather than a parallel support (at first).

@sripwoud
Copy link

Would love this feature too!
Currently as a not so elegant workaround I am defining 2 different denon.json config files. Then I run denon in 2 different terminal with the --config option. Ex:

  • denon -c src/denon.json build: watches src/index.ts and rebuilds on change
  • denon -c build/denon.json start: watches build/index.js and runs on change (i.e after rebuild)

@notfilippo
Copy link
Collaborator

Just pushed a branch with a basic implementation of this feature, you can take a look using this installation command:

$ deno install --allow-read --allow-run --allow-write --allow-net -f --unstable https://deno.land/x/denon@feat-sequential-scripts/denon.ts

Please let me know if you have any feedback on how this feature should be implemented further. 😊

@notfilippo notfilippo changed the title Support && in script cmd Support for sequential scripts Jun 27, 2020
notfilippo pushed a commit that referenced this issue Jul 25, 2020
@notfilippo notfilippo linked a pull request Jul 25, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants