11// @ts -check
22// Note: type annotations allow type checking and IDEs autocompletion
33
4- import fs from 'fs'
4+ import fs from "fs" ;
55require ( 'dotenv' ) . config ( )
66const { themes } = require ( 'prism-react-renderer' )
77const { REF_ALLOW_LOGIN_PATH } = require ( './src/lib/constants' )
@@ -12,13 +12,10 @@ const {
1212 MM_RPC_URL ,
1313} = require ( './src/plugins/plugin-json-rpc' )
1414const codeTheme = themes . dracula
15- const helpDropdown = fs . readFileSync ( './src/components/NavDropdown/DeveloperTools.html' , 'utf-8' )
16- const connectDropdown = fs . readFileSync (
17- './src/components/NavDropdown/ConnectMetaMask.html' ,
18- 'utf-8'
19- )
20- const embedDropdown = fs . readFileSync ( './src/components/NavDropdown/EmbedMetaMask.html' , 'utf-8' )
21- const extendDropdown = fs . readFileSync ( './src/components/NavDropdown/ExtendScale.html' , 'utf-8' )
15+ const helpDropdown = fs . readFileSync ( "./src/components/NavDropdown/DeveloperTools.html" , "utf-8" ) ;
16+ const connectDropdown = fs . readFileSync ( "./src/components/NavDropdown/ConnectMetaMask.html" , "utf-8" ) ;
17+ const embedDropdown = fs . readFileSync ( "./src/components/NavDropdown/EmbedMetaMask.html" , "utf-8" ) ;
18+ const extendDropdown = fs . readFileSync ( "./src/components/NavDropdown/ExtendScale.html" , "utf-8" ) ;
2219/** @type {import('@docusaurus/types').Config } */
2320const config = {
2421 title : 'MetaMask developer documentation' ,
@@ -122,17 +119,17 @@ const config = {
122119 sidebarCollapsed : false ,
123120 includeCurrentVersion : true ,
124121 // Set to the latest release.
125- lastVersion : ' 0.12.0' ,
122+ lastVersion : " 0.12.0" ,
126123 versions : {
127124 // Defaults to the ./docs folder.
128125 // Using "development" instead of "next" as path.
129126 current : {
130- label : ' development' ,
131- path : ' development' ,
127+ label : " development" ,
128+ path : " development" ,
132129 } ,
133130 // The latest release.
134- ' 0.12.0' : {
135- label : ' latest (0.12.0)' ,
131+ " 0.12.0" : {
132+ label : " latest (0.12.0)" ,
136133 } ,
137134 } ,
138135 } ,
@@ -205,9 +202,8 @@ const config = {
205202 ( {
206203 metadata : [
207204 {
208- name : 'keywords' ,
209- content :
210- 'MetaMask, SDK, Wallet, API, Dapp, App, Connect, Delegation, Toolkit, Documentation, Smart, Account, Snaps, Infura, Services, Dashboard' ,
205+ name : "keywords" ,
206+ content : "MetaMask, SDK, Wallet, API, Dapp, App, Connect, Delegation, Toolkit, Documentation, Smart, Account, Snaps, Infura, Services, Dashboard" ,
211207 } ,
212208 ] ,
213209 image : '/img/metamaskog.jpeg' ,
@@ -228,7 +224,7 @@ const config = {
228224 label : 'Connect to MetaMask' ,
229225 items : [
230226 {
231- type : ' html' ,
227+ type : " html" ,
232228 value : connectDropdown ,
233229 } ,
234230 ] ,
@@ -238,7 +234,7 @@ const config = {
238234 label : 'Embed MetaMask' ,
239235 items : [
240236 {
241- type : ' html' ,
237+ type : " html" ,
242238 value : embedDropdown ,
243239 } ,
244240 ] ,
@@ -248,7 +244,7 @@ const config = {
248244 label : 'Extend and scale' ,
249245 items : [
250246 {
251- type : ' html' ,
247+ type : " html" ,
252248 value : extendDropdown ,
253249 } ,
254250 ] ,
@@ -259,7 +255,7 @@ const config = {
259255 to : 'developer-tools/dashboard' ,
260256 items : [
261257 {
262- type : ' html' ,
258+ type : " html" ,
263259 value : helpDropdown ,
264260 } ,
265261 ] ,
@@ -411,14 +407,14 @@ const config = {
411407 additionalLanguages : [ 'csharp' , 'gradle' , 'bash' , 'json' ] ,
412408 magicComments : [
413409 {
414- className : ' git-diff-remove' ,
415- line : ' remove-next-line' ,
416- block : { start : ' remove-start' , end : ' remove-end' } ,
410+ className : " git-diff-remove" ,
411+ line : " remove-next-line" ,
412+ block : { start : " remove-start" , end : " remove-end" } ,
417413 } ,
418414 {
419- className : ' git-diff-add' ,
420- line : ' add-next-line' ,
421- block : { start : ' add-start' , end : ' add-end' } ,
415+ className : " git-diff-add" ,
416+ line : " add-next-line" ,
417+ block : { start : " add-start" , end : " add-end" } ,
422418 } ,
423419 ] ,
424420 } ,
0 commit comments