Adding comments header for compiled & optimized files
See original GitHub issueAdding a plain text to the header of a compiled and optimized .js
-file may be useful for multiple reasons:
- Adding metadata like version, compiler settings, date, …
- Adding execution information, e.g.
#!/usr/bin/env node
- Adding a License, Author, Support info, URL, …
Such a plain text header could easily be added to a .js
in a postprocessing step after compilation. However, if I am not mistaken, the Sourcemap would also have to be remapped. That seems to me like a quite involved chore.
This brings me to the following feature request: Would it be possible to add a “headerString” option to the SBT plugin, such that such a header can be added more easily?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How do you add a header comment to files compiled by gulp
I have a ASP .NET Core 3.1 project that is using gulp to compile a number of SCSS files and JS files. Is...
Read more >Precompiled Header Files | Microsoft Learn
The compiler options for precompiled headers are /Y . In the project property pages, the options are located under Configuration Properties > C/ ......
Read more >Optimizing Header File Include Directives
KEY WORDS: C, C++, header files, include directive, preprocessor ... conditional compilation, comment removal, and file inclusion [3, §3.8].
Read more >Optimizing Header File Include Directives - CiteSeerX
KEY WORDS: C, C++, header files, include directive, preprocessor ... conditional compilation, comment removal, and file inclusion [3, §3.8].
Read more >Top 10 C++ header file mistakes and how to fix them
1. Try to avoid putting any using namespace declarations in your header files. If you absolutely need some namespace objects to get your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would much rather insert actual JS comments (their grammar isn’t that hard to check, to make sure that no one is inserting anything but comments). That way reasonable use cases are addressed at the core.
And if someone really wants the shebang thing, they can insert a one-line comment, then do the patching.
Comments alone would already be very helpful to me. The
#!/usr/bin/env node
shebang may be useful to others but I don’t have a use case for it.