License Injector was born of necessity and laziness. If you ever have to add license information to all of your source files, you understand the painful monotony of copying and pasting the correctly formatted comment string to the top of every file. Next time, use License Injector to do the work for you!
License Injector is currently in super beta and there might be bugs. Please log them on GitHub if you find any!
Insert a full license to the root of your project.
Insert informational headers to every file in your project (can configure paths to ignore).
Insert an informational header to the current file you're working on (useful for new files in a project that's already had licenses added everywhere else).
Language detection so comments are inserted intelligently based on the context. This file has the currently supported languages (contact me if I'm missing one you want).
How to install
Open up the Command Palette (F1, CTRL+SHIFT+P).
Type ext install and hit ENTER.
Type License Injector and click the download icon ().
Restart VS Code to make the extension available.
There are a few configuration options that the extension relies on per project. When you're ready to add licenses, open up User Settings and search for License Injector to find the configuration options.
The person or organization the copyright belongs to.
A comma-delimited string of tokens to ignore in file paths. Files with these tokens in their paths will not be processed.
Inject all files
The first way to use License Injector is to add license information to all of your source files at the same time. I recommend this way so you don't even have to worry about licensing until you're ready to show the world. This option will add the appropriate comment (determined by filetype) to the top of each file and add a full license to the project root if one doesn't exist.
Configure options in User Settings. Don't forget to add directories that you don't want touched (i.e. node_modules or bin).