File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import fs from 'fs' ;
2+ import path from 'path' ;
3+ import { fileURLToPath } from 'url' ;
24import { Octokit } from 'octokit' ;
35import 'dotenv/config' ;
4- import PROJECT_REPOS from '../config/projects.json' with { type : "json" } ;
6+
7+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
8+ const PROJECT_REPOS = JSON . parse ( fs . readFileSync ( path . join ( __dirname , '../config/projects.json' ) , 'utf-8' ) ) ;
59
610const octokit = new Octokit ( { auth : process . env . GITHUB_TOKEN } ) ;
711
Original file line number Diff line number Diff line change 11import { NotionToMarkdown } from 'notion-to-md' ;
22import { Client } from '@notionhq/client' ;
33import fs from 'fs' ;
4+ import path from 'path' ;
5+ import { fileURLToPath } from 'url' ;
46import crypto from 'crypto' ;
57import 'dotenv/config' ;
6- import SETTINGS from '../config/site.json' with { type : "json" } ;
8+
9+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
10+ const SETTINGS = JSON . parse ( fs . readFileSync ( path . join ( __dirname , '../config/site.json' ) , 'utf-8' ) ) ;
711
812const notion = new Client ( { auth : process . env . NOTION_TOKEN || '' } ) ;
913
You can’t perform that action at this time.
0 commit comments