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 stmux for yarn dev to multiplex process output #88

Merged
merged 11 commits into from
Jan 31, 2019

Conversation

kumar303
Copy link
Contributor

@kumar303 kumar303 commented Jan 30, 2019

Fixes #86

The yarn dev command now multiplexes all developer-y things which preserves the pleasant experience of how create-react-app clears stdout as files change.

yarn dev screenshot 2019-01-31 10 55 30

For making use of wider screen area, there's a yarn dev-2col command, too.

yarn dev-2col screenshot 2019-01-31 11 17 54

@kumar303
Copy link
Contributor Author

@willdurand @bobsilverberg Before I add documentation, what do you think? Is it too prescriptive? If so, we could just expose yarn stmux and document the way to build the commands yourself. I do like the idea of having a single way for any team member to run all the things.

@codecov-io
Copy link

codecov-io commented Jan 30, 2019

Codecov Report

Merging #88 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #88   +/-   ##
=======================================
  Coverage   62.59%   62.59%           
=======================================
  Files          10       10           
  Lines         131      131           
  Branches       26       26           
=======================================
  Hits           82       82           
  Misses         45       45           
  Partials        4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a900ade...5c0d956. Read the comment docs.

Copy link
Member

@willdurand willdurand left a comment

Choose a reason for hiding this comment

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

I was a bit skeptical at first, especially because I am not sure this stmux project is finished/well maintained and I can easily imagine issues with various OS but I love the dev experience ❤️

Let's ship it!

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
scripts/server.js Outdated Show resolved Hide resolved
@bobsilverberg
Copy link
Contributor

This is fantastic! Thanks @kumar303!

@kumar303 kumar303 changed the title [WIP] Use stmux for yarn dev to multiplex process output Use stmux for yarn dev to multiplex process output Jan 31, 2019
@kumar303
Copy link
Contributor Author

@willdurand @bobsilverberg thanks for taking an early look. I added docs and settled on two main commands. If in the future we don't end up using them or we all use custom commands 😅 then we could consider removing them.

  • yarn dev now stacks everything in one column.
  • yarn dev-2col puts yarn test in its own column since scrollback will be important there.

Copy link
Member

@willdurand willdurand left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks! r+wc

ℹ️ I noticed the yarn.lock file was not in sync on my machine. Could you check that please?

@@ -13,6 +13,10 @@ const app = createServer({
rootPath: path.join(__dirname, '..'),
});

const printDivider = () => {
console.log('\n' + '#'.repeat(60) + '\n');
Copy link
Member

Choose a reason for hiding this comment

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

70 was used so that it was longer than the text inside.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just reduced the width of all text (in a separate commit). It won't be perfect on every screen but keeping it less wide makes it slightly more versatile.

@kumar303
Copy link
Contributor Author

I think snyk is up to date but it probably don't like running on a branch or something

@kumar303 kumar303 merged commit 383d434 into mozilla:master Jan 31, 2019
@kumar303 kumar303 deleted the stmux-86 branch January 31, 2019 17:36
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.

None yet

4 participants