Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async function _checkDisabled(dir: string): Promise<string | false | undefined>
return 'by ' + resolve(dir, RC_FILENAME)
}

if (disabledByConf(rc.readUser({ name: RC_FILENAME }))) {
if (disabledByConf(rc.readUserConfig({ name: RC_FILENAME }))) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this still support ~/.nuxtrc (ie backwards compatibility)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh right, I forgot about that

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be backward compatible now. Just need to add the new config read is all instead of replacing the old one

return 'by ' + resolve(homedir(), RC_FILENAME)
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
}
Expand All @@ -172,7 +172,7 @@ async function showStatus(dir: string, global: boolean) {
function setRC(dir: string, key: any, val: any, global: boolean) {
const update = { [key]: val }
if (global) {
rc.updateUser(update, RC_FILENAME)
rc.updateUserConfig(update, RC_FILENAME)
}
else {
rc.update(update, { name: RC_FILENAME, dir })
Expand Down
4 changes: 2 additions & 2 deletions src/utils/nuxtrc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { updateUser } from 'rc9'
import { updateUserConfig } from 'rc9'

export function updateUserNuxtRc(key: string, val: string | number | boolean) {
updateUser({ [key]: val }, '.nuxtrc')
updateUserConfig({ [key]: val }, '.nuxtrc')
}
Loading