mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* [grunt/build] refactor _build:notice task to not depend on npm
The _build:notice task used to rely on the output of `npm ls` to determine where modules were defined, but the task now just asks `license-checker` to include the `realPath` of the modules it describes in it's output, which is ultimately the same thing but works with `yarn` too.
* [grunt/licenses] convert to use lib/packages/getInstalledPackages()
* [grunt/notice/generate] test generateNoticeText()
* [grunt/licenses] tested assertLicensesValid()
* [npm] remove npm dev dep
* [tasks/lib/packages] do not include kibana in "installed packages"
* [tasks/lib/notice] join all notices with the same separator
(cherry picked from commit 5c04ff65fb
)
8 lines
280 B
JavaScript
8 lines
280 B
JavaScript
import { resolve } from 'path';
|
|
import { readFileSync } from 'fs';
|
|
|
|
export function generateNodeNoticeText(nodeDir) {
|
|
const licensePath = resolve(nodeDir, 'LICENSE');
|
|
const license = readFileSync(licensePath, 'utf8');
|
|
return `This product bundles Node.js.\n\n${license}`;
|
|
}
|