fix(aidocs, config): migrate aidocs configuration handling from npmextra to smartconfig
This commit is contained in:
@@ -79,15 +79,15 @@ Don't wrap the JSON in \`\`\`json\`\`\` - just return the raw JSON object.
|
||||
const projectContext = new ProjectContext(this.projectDir);
|
||||
const files = await projectContext.gatherFiles();
|
||||
|
||||
// Update npmextra.json
|
||||
const npmextraJson = files.smartfilesNpmextraJSON;
|
||||
const npmextraJsonContent = JSON.parse(npmextraJson.contents.toString());
|
||||
// Update smartconfig.json
|
||||
const smartconfigJson = files.smartfilesNpmextraJSON;
|
||||
const smartconfigJsonContent = JSON.parse(smartconfigJson.contents.toString());
|
||||
|
||||
npmextraJsonContent['@git.zone/cli'].module.description = resultObject.description;
|
||||
npmextraJsonContent['@git.zone/cli'].module.keywords = resultObject.keywords;
|
||||
smartconfigJsonContent['@git.zone/cli'].module.description = resultObject.description;
|
||||
smartconfigJsonContent['@git.zone/cli'].module.keywords = resultObject.keywords;
|
||||
|
||||
npmextraJson.contents = Buffer.from(JSON.stringify(npmextraJsonContent, null, 2));
|
||||
await npmextraJson.write();
|
||||
smartconfigJson.contents = Buffer.from(JSON.stringify(smartconfigJsonContent, null, 2));
|
||||
await smartconfigJson.write();
|
||||
|
||||
// Update package.json
|
||||
const packageJson = files.smartfilePackageJSON;
|
||||
|
||||
Reference in New Issue
Block a user