Skip to content

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

Merged
dhh merged 1 commit intorails:mainfrom
faqndo97:update_console_table_to_be_markdown_compatible
Jan 3, 2024
Merged

Update Impoortmaps::Command#puts_table to be markdown compatible#222
dhh merged 1 commit intorails:mainfrom
faqndo97:update_console_table_to_be_markdown_compatible

Conversation

@faqndo97
Copy link
Copy Markdown
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
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