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

Update Impoortmaps::Command#puts_table to be markdown compatible #222

Merged

Conversation

faqndo97
Copy link
Contributor

@faqndo97 faqndo97 commented Jan 2, 2024

Proposal to make the command table markdown compatible, so it's easier to copy the table and paste directly in any markdown (normally the PR description) and display it with the correct styles.

➜  dummy git:(main) ✗ bin/importmap outdated
+-------------------+---------+--------+
| Package           | Current | Latest |
+-------------------+---------+--------+
| @rails/request.js | 0.0.6   | 0.0.9  |
+-------------------+---------+--------+
  1 outdated package found
➜  dummy git:(main) ✗ bin/importmap outdated
| Package           | Current | Latest |
|-------------------|---------|--------|
| @rails/request.js | 0.0.6   | 0.0.9  |
  1 outdated package found

Also displaying the table here:

Old:
+-------------------+---------+--------+
| Package | Current | Latest |
+-------------------+---------+--------+
| @rails/request.js | 0.0.6 | 0.0.9 |
+-------------------+---------+--------+

New:

Package Current Latest
@rails/request.js 0.0.6 0.0.9

Another option instead of make this the default is to accept a flag like --md to print the table as markdown compatible.

@dhh dhh merged commit 25e9166 into rails:main Jan 3, 2024
21 checks passed
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