/**
* @file
*
* Provides the build:js command to compile *.es6.js files to ES5.
*
* Run build:js with --file to only parse a specific file. Using the --check
* flag build:js can be run to check if files are compiled correctly.
* @example
Only process misc/drupal.es6.js and misc/drupal.init.es6.jsCheck if all files have been compiled correctly {
if (error) {
process.exitCode = 1;
}
// Process all the found files.
let callback = changeOrAdded;
if (argv.check) {
callback = check;
}
filePaths.forEach(callback);
};
if (argv.file) {
processFiles(null, [].concat(argv.file));
}
else {
glob(fileMatch, globOptions, processFiles);
}
process.exitCode = 0;