-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] A couple of simply fixes from #34870 #34953
[core] A couple of simply fixes from #34870 #34953
Conversation
@@ -155,14 +155,14 @@ module.exports = async function demoLoader() { | |||
this.addDependency(moduleFilepath); | |||
demos[demoName] = { | |||
module: moduleID, | |||
raw: await fs.readFile(moduleFilepath, { encoding: 'utf-8' }), | |||
raw: await fs.readFile(moduleFilepath, { encoding: 'utf8' }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an alias, but the default is the one used here https://github.com/nodejs/node/blob/2364ed7d669bd569f8a70147c177a132ef5a7100/lib/buffer.js#L688.
|
||
export const docs = ${JSON.stringify(docs, null, 2)}; | ||
export const demos = ${JSON.stringify(demos, null, 2)}; | ||
export const demoComponents = {${Array.from(demoModuleIDs) | ||
.map((moduleID) => { | ||
return `${JSON.stringify(moduleID)}: ${moduleIDToJSIdentifier(moduleID)},`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra lines make a console.log of the output messy.
|
ecd2b72
to
bf1b6a1
Compare
Extracted from #34870 as they are improvements on their own.