Commit ce220d6a authored by rockyl's avatar rockyl

抽离common-component-list

parent 0b420f41
......@@ -29,7 +29,6 @@ function getAllDependencies(dependencies, missingDependencies, componentName, ve
}else{
missingDependencies[key] = temp[key];
}
}
}
}
......@@ -41,10 +40,12 @@ exports.execute = async function (program) {
return 1;
}
const componentsPath = program.projectPath || path.join(os.homedir(), '.scilla', 'components');
const projectPath = program.projectPath || process.cwd();
const componentsPath = path.join(os.homedir(), '.scilla', 'components');
const componentsSrcPath = path.join(componentsPath, 'src');
const tsconfig = fs.readJsonSync(path.join(componentsPath, 'tsconfig.json'));
const tsconfig = fs.readJsonSync('tsconfig.json');
const inputFile = program.input;
const inputFileFolder = path.dirname(inputFile);
......@@ -61,8 +62,6 @@ exports.execute = async function (program) {
return result;
}
const projectPath = process.cwd();
function declareFilter(source) {
return source.fileName.indexOf(inputFileFolder) >= 0;
}
......@@ -71,7 +70,7 @@ exports.execute = async function (program) {
tsconfig,
dependencies,
inputFile,
componentsSrcPath,
componentsPath,
projectPath,
null,
declareFilter
......
File mode changed from 100644 to 100755
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