feat: convert all files to esm
This commit is contained in:
parent
ef6923ece6
commit
e8fd3a17d2
34 changed files with 202 additions and 228 deletions
|
@ -87,4 +87,4 @@ const blogroll = [
|
|||
|
||||
const sortedBlogroll = blogroll.sort((a, b) => a.title.localeCompare(b.title));
|
||||
|
||||
module.exports = sortedBlogroll;
|
||||
export default sortedBlogroll;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
require("dotenv").config();
|
||||
import "dotenv/config";
|
||||
|
||||
const EleventyFetch = require("@11ty/eleventy-fetch");
|
||||
const dayjs = require("dayjs");
|
||||
const utc = require("dayjs/plugin/utc");
|
||||
const relativeTime = require("dayjs/plugin/relativeTime");
|
||||
import EleventyFetch from "@11ty/eleventy-fetch";
|
||||
import dayjs from "dayjs";
|
||||
import utc from "dayjs/plugin/utc.js";
|
||||
import relativeTime from "dayjs/plugin/relativeTime.js";
|
||||
|
||||
dayjs.extend(utc);
|
||||
dayjs.extend(relativeTime);
|
||||
|
@ -87,7 +87,7 @@ const fetchRecentTracks = async () => {
|
|||
return recentTracks;
|
||||
};
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const recentTracks = await fetchRecentTracks();
|
||||
const recentAlbums = await fetchRecentAlbums();
|
||||
|
||||
|
@ -95,4 +95,4 @@ module.exports = async function () {
|
|||
recentTracks,
|
||||
recentAlbums,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
require("dotenv").config();
|
||||
import "dotenv/config";
|
||||
|
||||
const EleventyFetch = require("@11ty/eleventy-fetch");
|
||||
const cheerio = require("cheerio");
|
||||
const dayjs = require("dayjs");
|
||||
const utc = require("dayjs/plugin/utc");
|
||||
const relativeTime = require("dayjs/plugin/relativeTime");
|
||||
import EleventyFetch from "@11ty/eleventy-fetch";
|
||||
import cheerio from "cheerio";
|
||||
import dayjs from "dayjs";
|
||||
import utc from "dayjs/plugin/utc.js";
|
||||
import relativeTime from "dayjs/plugin/relativeTime.js";
|
||||
|
||||
dayjs.extend(utc);
|
||||
dayjs.extend(relativeTime);
|
||||
|
@ -65,4 +65,4 @@ const fetchRecentMovies = async () => {
|
|||
return recentMovies;
|
||||
};
|
||||
|
||||
module.exports = fetchRecentMovies;
|
||||
export default fetchRecentMovies;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export default {
|
||||
url: process.env.URL || "http://localhost:8080",
|
||||
siteName: "wonderfulfrog",
|
||||
siteDescription:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export default {
|
||||
top: [
|
||||
{
|
||||
text: "About",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { getFontUrl } = require("../utils/fonts");
|
||||
const fonts = require("../../config/design-tokens/fonts.json");
|
||||
import { getFontUrl } from "../utils/fonts.js";
|
||||
import fonts from "../../config/design-tokens/fonts.js";
|
||||
|
||||
const preloads = [
|
||||
{
|
||||
|
@ -19,4 +19,4 @@ const preloads = [
|
|||
},
|
||||
];
|
||||
|
||||
module.exports = preloads;
|
||||
export default preloads;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require("dotenv").config();
|
||||
import "dotenv/config";
|
||||
|
||||
const EleventyFetch = require("@11ty/eleventy-fetch");
|
||||
import EleventyFetch from "@11ty/eleventy-fetch";
|
||||
|
||||
const accessToken = process.env.DARK_VISITORS_ACCESS_TOKEN;
|
||||
|
||||
|
@ -101,7 +101,7 @@ const fetchRobotsTxt = async () => {
|
|||
}
|
||||
};
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const robotsTxt = await fetchRobotsTxt();
|
||||
|
||||
if (!robotsTxt) {
|
||||
|
@ -109,4 +109,4 @@ module.exports = async function () {
|
|||
}
|
||||
|
||||
return robotsTxt;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue