Commit 5ab9ab60 authored by rockyl's avatar rockyl

init

parent d5b2491b
...@@ -27,7 +27,7 @@ exports.execute = async function (program) { ...@@ -27,7 +27,7 @@ exports.execute = async function (program) {
return source.fileName.indexOf(inputFileFolder) >= 0; return source.fileName.indexOf(inputFileFolder) >= 0;
} }
const result = generateDeclareMap( const {declareMap, dependencies, missingDependencies} = generateDeclareMap(
tsconfig, tsconfig,
inputFile, inputFile,
componentsSrcPath, componentsSrcPath,
...@@ -40,10 +40,12 @@ exports.execute = async function (program) { ...@@ -40,10 +40,12 @@ exports.execute = async function (program) {
console.log(result); console.log(result);
} }
if (Object.keys(result.missingDependencies).length > 0) { declareMap.dependencies = dependencies;
console.warn(JSON.stringify(result.missingDependencies, null, '\t'));
if (Object.keys(missingDependencies).length > 0) {
console.warn(JSON.stringify(missingDependencies, null, '\t'));
process.exit(2); 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