Finds your license file
Checks COPYRIGHT, then LICENSE, in the working directory. Set filename & cwd to look anywhere else: the first match wins.
A PostCSS plugin that prepends your COPYRIGHT or LICENSE file to each stylesheet as a /*! … */ comment. No file? You get a warning, not a failed build.
// postcss.config.js
import licensing from "@allons-y/postcss-licensing";
export default {
plugins: [licensing()],
};
Copy {name} to clipboard
Copy
Copied
Copy failed
js code
npm install --save-dev @allons-y/postcss-licensing
Copy {name} to clipboard
Copy
Copied
Copy failed
sh code
Checks COPYRIGHT, then LICENSE, in the working directory. Set filename & cwd to look anywhere else: the first match wins.
The header is a /*! comment, the form most CSS minifiers keep, so the license reaches your published files.
A missing or empty license file adds a PostCSS warning that names where it looked. Your build keeps going.
Empty files stay empty instead of becoming a lone license comment. Turn skipIfEmpty off if you want the header anyway.
Allons-y Studio
A front-end & design systems studio helping teams ship consistent, accessible UI faster.