debian-mirror-gitlab/doc/.markdownlint/require_helper.js
2023-01-12 18:35:48 +00:00

14 lines
539 B
JavaScript

/**
* Look up the global node modules directory.
*
* Because we install markdownlint packages globally
* in the Docker image where this runs, we need to
* provide the path to the global install location
* when referencing global functions from our own node
* modules.
*
* Image:
* https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/dockerfiles/gitlab-docs-lint-markdown.Dockerfile
*/
const { execSync } = require('child_process');
module.exports.globalPath = execSync('yarn global dir').toString().trim() + '/node_modules/';