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

No example on command line commands #158

Closed
nayots opened this issue Jun 27, 2019 · 4 comments
Closed

No example on command line commands #158

nayots opened this issue Jun 27, 2019 · 4 comments

Comments

@nayots
Copy link

nayots commented Jun 27, 2019

There is no clear example on how to create a task that executes a command line command.

For example how would you execute a task that starts with "ng build" and then runs some other command line task.

@kenotron
Copy link
Member

Do you mean how to run this thing like

ng build

Which would translate to build -> tsc, webpack etc? I think that is the point of this document page:
https://microsoft.github.io/just/docs/doc-start.html

I actually am not familiar with how ng command line works but if you stick with the doc there, you would see that there's not a need to call ng. just would take over the build command... does that make sense?

@nayots
Copy link
Author

nayots commented Jun 28, 2019

Not really what i mean.
What i mean is to integrate command line commands execution in the tasks, something like what https://www.npmjs.com/package/gulp-shell is doing ?

@beary
Copy link

beary commented Aug 23, 2019

Maybe this?

const { task } = require('just-task')
const { exec } = require('just-scripts-utils')

task('build', () => {
  return exec('echo "hello world!"', {
    stderr: process.stderr,
    stdout: process.stdout
  })
})
$ npx just build

[5:39:55 PM] ■ started 'build'
hello world!
[5:39:55 PM] ■ finished 'build' in 0.01s

This should be placed in the document.

@github-actions
Copy link

github-actions bot commented Mar 8, 2020

Issues seem to have gone stale.

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

No branches or pull requests

3 participants