npm

Commercial Licenses for NPM Packages


When creating new projects, the standard package.json file usually contains a MIT License or similar – but for those of us (Evil Capitalists!) who want to take simple steps to protect our rights and ownership of the code, it's not immediately obvious how best to add a suitable license.

In practice it's extremely simple, add the following to your package.json file

"license": "UNLICENSED"

Then in the same root as your package.json create a file named LICENSE and inside it add the following text;

(c) Copyright YYYY Your legal entity. All rights reserved.

For example;

(c) Copyright 2016 Bonbon Group Ltd. All rights reserved.

This should be enough to satisfy NPM commands if you had a missing or incorrect license, and this does replace the older "license": "LicenseRef-LICENSE" of earlier NPM versions.


javascript

A tech native with 20 years of experience across the digital space. Darryl is an evangelist for the power and disruption of blockchain technologies and fosters a passion for bringing ever greater utility and adoption to the masses.

Related Articles

Babel

Fixing Uglify Errors With Babel

AWS Elastic Beanstalk

Keeping Elastic Beanstalk configs in code

Visual Studio Code

Essential VS Code Libraries for 2020

Copyright © 2016-2024 Bonbon Group Ltd. All Rights Reserved.