ioquatix / script-runner

This package will run various script files inside of Atom. It currently supports JavaScript, CoffeeScript, Ruby, and Python. You can add more.
http://atom.io/packages/script-runner
Other
62 stars 23 forks source link

Add a "compile" action #22

Closed AngelEzquerra closed 7 years ago

AngelEzquerra commented 9 years ago

In addition to "running" a script, it would be very convenient to also add a "compile" action that would compile the current file, without running it. This would be particularly useful for non scripting languages, and for languages whose files can both be run and compiled.

ioquatix commented 9 years ago

Can you give me a use case?

AngelEzquerra commented 9 years ago

An example use case would be when working compiled languages (such as nim, or autoit3 for example). In those cases you may want to just compile or to compile and run your program.

ioquatix commented 8 years ago

I've thought about this in the past. What I've done is made a wrapper which does it. So, I made a file called "c++run" which reads from stdin, compiles that, and then runs it. We could potentially look at bundling something like that.. would that make sense? Is this still an important use-case for you?

ioquatix commented 7 years ago

For compiled languages that are commonly used, we could add some basic logic to compile and execute. It would still be the same command though. What do you think?

ioquatix commented 7 years ago

I've added support for a shell, so if you just want to execute arbitrary commands, you could use that.

Another option is to have a file, with one line for each thing you want to do e.g. tasks.sh containing:

ps aux

ls -lah

Then just highlight that one line, and run it with script runner. This way you can document it, keep it as part of the project, and so on.

If you have other ideas, feel free to submit a PR.