Git Product home page Git Product logo

Comments (14)

mightyiam avatar mightyiam commented on May 13, 2024

I've just tried with $ dirwatch -vc standard and $ onchange 'somefile' -- standard. No output. Perhaps standard is throwing to wrong output?

from standard.

yoshuawuyts avatar yoshuawuyts commented on May 13, 2024

possibly related: piping through grep doesn't filter.

standard | grep variable

from standard.

feross avatar feross commented on May 13, 2024

standard prints to stderr. I'm not sure what the convention is for these things. Should it print to stdout instead?

from standard.

mafintosh avatar mafintosh commented on May 13, 2024

i think it should keep printing to stderr since its normal to do stuff like standard && tape test.js. otherwise it would mess up a tap parser (like npm test | tap-spec)

you can always just run

standard 2>&1 | grep variable

from standard.

yoshuawuyts avatar yoshuawuyts commented on May 13, 2024

@mafintosh ah, that makes sense. Didn't know grep was so picky with its input, hah. Thanks for explaining!

from standard.

yoshuawuyts avatar yoshuawuyts commented on May 13, 2024

Added a PR that adds the explanation to the FAQ. Pretty sure this is also the reason watchify is failing for @mightyiam. Hope it'll resolve this issue.

from standard.

mafintosh avatar mafintosh commented on May 13, 2024

@yoshuawuyts typing random chars in bash fixes most problems 👍

from standard.

yoshuawuyts avatar yoshuawuyts commented on May 13, 2024

@mafintosh you might've just fixed life itself 👏👏👏

from standard.

mightyiam avatar mightyiam commented on May 13, 2024

I'm observing that the standard behavior is to output to stdout and not to stderr.

Try it like this:

Clone standard.

git clone feross/standard
cd standard
npm i

Make a non–standard JS file.

echo ';\n ;' > nonstandard.js

Run ESLint and JSCS on the non–standard JS file, redirecting stdouts to files.

./node_modules/eslint/bin/eslint.js -c rc/.eslintrc nonstandard.js 1> eslint-stdout
./node_modules/jscs/bin/jscs -c rc/.jscsrc nonstandard.js 1> jscs-stdout

Observe that no output was printed. This means stderr wasn't used.
See that stdout was used.

cat jscs-stdout
cat eslint-stdout

Try the same with our beloved standard.

./bin/cmd.js 1> standard-stdout
cat standard-stdout

So it seems that the standard is to print to stdout.

from standard.

mightyiam avatar mightyiam commented on May 13, 2024

Unless, of course, standard experiences an actual error—like bad arguments or not finding its dependencies or something.

from standard.

feross avatar feross commented on May 13, 2024

@mightyiam You make a good point.

@maxogden Do you have any thoughts?

from standard.

mightyiam avatar mightyiam commented on May 13, 2024

BTW, I've switched to npm-watch, because of the integration with package.json. It is just "how it is done".

from standard.

feross avatar feross commented on May 13, 2024

Going to close this issue as it doesn't seem to be causing trouble for anyone anymore. Feel free to make a new issue or leave a comment if that's not true.

from standard.

mightyiam avatar mightyiam commented on May 13, 2024

Since vim-syntastic/syntastic@c1a2098 I have it in my editor so I'm not using watch or npm-watch so I'm not affected by this anymore.

If you're not in a hurry to fix it, that's ok but it seems to me that this issue should at least be kept open.

from standard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.