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

use shelljs for shell like commands #94

Closed
wants to merge 4 commits into from
Closed

use shelljs for shell like commands #94

wants to merge 4 commits into from

Conversation

mikekidder
Copy link
Contributor

This is preliminary; unsure of the test:cov and test:watch.. The latter is causing a loop

@mikekidder
Copy link
Contributor Author

Also note that ansi codes currently will not come through on output.

@gaearon
Copy link
Contributor

gaearon commented Jun 15, 2015

@mikekidder Do you need help fixing those problems?

@mikekidder
Copy link
Contributor Author

  1. test:cov - may be a mocha issue w/windows, doesn't appear you are having error. Correct?
  2. test:watch - may be related to test:cov, but the --watch may probablematic for shelljs
  3. colors output - shelljs using child-process internally; known issue Preserve colors in output of exec() shelljs/shelljs#86

If you want to get away from npm script, as you mention in commit, could also look into gulp.

@gaearon
Copy link
Contributor

gaearon commented Jun 15, 2015

Woah, color support is a bummer! The issue has been up for two years..

Can you help me with understanding what exactly fails on Windows? How are shell scripts different from the same commands right inside package.json? Why do these commands work, but shell scripts don't work?

@mikekidder
Copy link
Contributor Author

No difference in running npm script vs. shelljs. The test scripts were put in after my initial PR's, and hadn't ran them yet until yesterday.

This fixes test:cov as mentioned in gotwarlost/istanbul#90. Path to mocha should work on Mac as well. And looks like test:watch is working.

This really leaves no color output as the issue.

@gaearon
Copy link
Contributor

gaearon commented Jun 15, 2015

Thanks! I'll take another look later today.


sh.exec('eslint src test', function(code, output) {

if(code === 0){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit pick: missing space before { and unneeded newlines before and after if block.

@gaearon gaearon mentioned this pull request Jun 16, 2015
@gaearon
Copy link
Contributor

gaearon commented Jun 16, 2015

This PR should also remove the old scripts, right?

@gaearon
Copy link
Contributor

gaearon commented Jun 18, 2015

Sorry for dragging my feet here. I'm very busy atm, but will be more available in a week or so.
I'll definitely either merge this or go back to npm scripts.

Just give me some more time before looking at it!
Cheers

@mikekidder
Copy link
Contributor Author

Oh, no worries from me. I know how to work around the shell scripts. :)
FWIW, the npm scripts worked and has color output.

@gaearon gaearon mentioned this pull request Jun 22, 2015
13 tasks
This was referenced Jul 9, 2015
@gaearon
Copy link
Contributor

gaearon commented Jul 15, 2015

Closing in favor of #267.
Nevertheless thanks for working on this!

@gaearon gaearon closed this Jul 15, 2015
@mikekidder mikekidder deleted the package.shelljs branch July 15, 2015 12:56
@gaearon
Copy link
Contributor

gaearon commented Jul 22, 2015

Fixed by #267, the fix is merged into breaking-changes-1.0 branch. Feel free to give it a go!

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

Successfully merging this pull request may close these issues.

2 participants