2.77.0 • Published 6 years ago

license-adder v2.77.0

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

license-adder

NPM module to add license headers to all file types listed.

  • .cs
  • .ts
  • .js
  • .css
  • .scss
  • .sass
  • .html
  • .xml
  • .xaml
  • .config
  • .sql

License types currently supported

  • MIT
  • Apache
  • AGPL

Also adds full LICENSE.txt file to the directory the commmand is run in.

Excludes adding header to files in 'node_modules' folder.

Installation

npm install license-adder -g

Usage

license-adder

Run 'license-adder' command in the terminal that is open in the directory that contains all your files that require license headers adding to them.

licenseType prompt answers required for the currently supported license types are:

  • For MIT license enter 'mit' under the licenseType prompt.
  • For Apache license enter 'apache' under the licenseType prompt.
  • For AGPL license enter 'agpl' under the licenseType prompt.

If an unrecognised licenseType is entered then the header below is inserted as default:

briefDescription
Copyright (C) date(year)  firstname lastname

See LICENSE in the project root for license information.

Example of the prompts presented in the terminal:

prompt: licenseType:  mit
prompt: briefDescription:  App Description Goes Here
prompt: firstname:  Enter First Name Here
prompt: lastname:  Enter Last Name Here

licenseType, briefDescription and firstname prompts are mandatory, headers will not be applied without all of them.

Example of headers added to file types

.cs .ts .js .css .scss .sass

//App Description Goes Here
// MIT License
//
// Copyright (C) 2018  Enter First Name Here Enter Last Name Here
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// See LICENSE in the project root for license information.

.html .xml .xaml .config

<!-- App description goes here
Copyright (C) 2018  firstname goes here lastname goes here

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

See LICENSE in the project root for license information. -->

.sql

-- App description goes here
-- MIT License
-- 
-- Copyright (C) 2018  firstname goes here lastname goes here
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- 
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- 
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
-- 
-- See LICENSE in the project root for license information.
2.77.0

6 years ago

2.76.0

6 years ago

2.75.0

6 years ago

2.74.0

6 years ago

2.73.0

6 years ago

2.72.0

6 years ago

2.71.0

6 years ago

2.70.0

6 years ago

2.69.0

6 years ago

2.68.0

6 years ago

2.67.0

6 years ago

2.66.0

6 years ago

2.65.0

6 years ago

2.64.0

6 years ago

2.63.0

6 years ago

2.62.0

6 years ago

2.61.0

6 years ago

2.60.0

6 years ago

2.59.0

6 years ago

2.58.0

6 years ago

2.57.0

6 years ago

2.56.0

6 years ago

2.55.0

6 years ago

2.54.0

6 years ago

2.53.0

6 years ago

2.52.0

6 years ago

2.51.0

6 years ago

2.50.0

6 years ago

2.49.0

6 years ago

2.48.0

6 years ago

2.47.0

6 years ago

2.46.0

6 years ago

2.45.0

6 years ago

2.44.0

6 years ago

2.43.0

6 years ago

2.42.0

6 years ago

2.41.0

6 years ago

2.40.0

6 years ago

2.39.0

6 years ago

2.38.0

6 years ago

2.37.0

6 years ago

2.36.0

6 years ago

2.35.0

6 years ago

2.34.0

6 years ago

2.33.0

6 years ago

2.32.0

6 years ago

2.31.0

6 years ago

2.30.0

6 years ago

2.29.0

6 years ago

2.28.0

6 years ago

2.27.0

6 years ago

2.26.0

6 years ago

2.25.0

6 years ago

2.24.0

6 years ago

2.23.0

6 years ago

2.22.0

6 years ago

2.21.0

6 years ago

2.20.0

6 years ago

2.19.0

6 years ago

2.18.0

6 years ago

2.17.0

6 years ago

2.16.0

6 years ago

2.15.0

6 years ago

2.14.0

6 years ago

2.13.0

6 years ago

2.12.0

6 years ago

2.11.0

6 years ago

2.10.0

6 years ago

2.9.0

6 years ago

2.8.0

6 years ago

2.7.0

6 years ago

2.6.0

6 years ago

2.5.0

6 years ago

2.4.0

6 years ago

2.3.0

6 years ago

2.2.0

6 years ago

2.1.0

6 years ago