MDL-67949 grunt: Add debugging information

This commit is contained in:
Andrew Nicols 2020-02-13 13:26:31 +08:00
parent 91434142a4
commit 843cf97bf6

View File

@ -172,13 +172,26 @@ module.exports = function(grunt) {
const inComponent = !!componentDirectory; const inComponent = !!componentDirectory;
const runDir = inComponent ? componentDirectory : relativeCwd; const runDir = inComponent ? componentDirectory : relativeCwd;
const fullRunDir = fs.realpathSync(gruntFilePath + path.sep + runDir); const fullRunDir = fs.realpathSync(gruntFilePath + path.sep + runDir);
grunt.log.debug(`The cwd was detected as ${cwd} with a fullRunDir of ${fullRunDir}`); grunt.log.debug('============================================================================');
grunt.log.debug(`= Node version: ${process.versions.node}`);
grunt.log.debug(`= grunt version: ${grunt.package.version}`);
grunt.log.debug(`= process.cwd: '` + process.cwd() + `'`);
grunt.log.debug(`= process.env.PWD: '${process.env.PWD}'`);
grunt.log.debug(`= path.sep '${path.sep}'`);
grunt.log.debug('============================================================================');
grunt.log.debug(`= gruntFilePath: '${gruntFilePath}'`);
grunt.log.debug(`= relativeCwd: '${relativeCwd}'`);
grunt.log.debug(`= componentDirectory: '${componentDirectory}'`);
grunt.log.debug(`= inComponent: '${inComponent}'`);
grunt.log.debug(`= runDir: '${runDir}'`);
grunt.log.debug(`= fullRunDir: '${fullRunDir}'`);
grunt.log.debug('============================================================================');
if (inComponent) { if (inComponent) {
grunt.log.ok(`Running tasks for component directory ${componentDirectory}`); grunt.log.ok(`Running tasks for component directory ${componentDirectory}`);
} }
var files = null; let files = null;
if (grunt.option('files')) { if (grunt.option('files')) {
// Accept a comma separated list of files to process. // Accept a comma separated list of files to process.
files = grunt.option('files').split(','); files = grunt.option('files').split(',');