Make WordPress Core

Opened 11 days ago

Closed 10 days ago

Last modified 10 days ago

#44361 closed defect (bug) (fixed)

Add output tags to all JavaScript source files

Reported by: omarreiss Owned by: atimmer
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: javascript, docs Cc:


To make it clear where a JavaScript file in source is built to, I'm adding @output tags to all JavaScript files that are not vendor scripts.

@herregroen is working on a patch to parse these to automatically generate entry tags for Webpack.

The plan is to create a JSDoc plugin to parse those for Devhub as well.

Attachments (4)

output-tags.patch (34.9 KB) - added by omarreiss 11 days ago.
output-tags-1.patch (45.7 KB) - added by omarreiss 11 days ago.
Fixed 1 typo
output-tags-2.patch (34.8 KB) - added by omarreiss 11 days ago.
Had to rebase…
output-tags-3.patch (35.2 KB) - added by omarreiss 10 days ago.
Makes sure single line comments become multiline

Download all attachments as: .zip

Change History (6)

11 days ago

Fixed 1 typo

11 days ago

Had to rebase...

10 days ago

Makes sure single line comments become multiline

#1 @atimmer
10 days ago

  • Owner set to atimmer
  • Resolution set to fixed
  • Status changed from new to closed

In 43347:

Docs: Add file doc @output annotations.

These annotations make it clear to the reader of a JavaScript source
where the build process outputs to. These annotations can later be
integrated in a webpack configuration. This way there is one source of

The build folder is omitted from the paths, because a single JS file
shouldn't not be responsible of knowing where outputs in general will
end up at. A file only knows its output location relative to the

Props adamsilverstein, herregroen, omarreiss, pento.
Fixes #44361.

#2 @netweb
10 days ago

  • Milestone changed from Awaiting Review to 5.0
Note: See TracTickets for help on using tickets.