Commit 5ab9ab60 authored by rockyl's avatar rockyl

init

parent d5b2491b
......@@ -27,7 +27,7 @@ exports.execute = async function (program) {
return source.fileName.indexOf(inputFileFolder) >= 0;
}
const result = generateDeclareMap(
const {declareMap, dependencies, missingDependencies} = generateDeclareMap(
tsconfig,
inputFile,
componentsSrcPath,
......@@ -40,10 +40,12 @@ exports.execute = async function (program) {
console.log(result);
}
if (Object.keys(result.missingDependencies).length > 0) {
console.warn(JSON.stringify(result.missingDependencies, null, '\t'));
declareMap.dependencies = dependencies;
if (Object.keys(missingDependencies).length > 0) {
console.warn(JSON.stringify(missingDependencies, null, '\t'));
process.exit(2);
}
fs.writeJsonSync(outputFile, result.declareMap);
fs.writeJsonSync(outputFile, declareMap);
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment