Skip to content

Commit 09b0b77

Browse files
committed
ESM
Signed-off-by: Sora Morimoto <[email protected]>
1 parent 5a4aca5 commit 09b0b77

File tree

11 files changed

+41
-12
lines changed

11 files changed

+41
-12
lines changed

.eleventy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = (eleventyConfig) => {
1+
export default (eleventyConfig) => {
22
eleventyConfig.addPassthroughCopy("assets");
33
eleventyConfig.addPassthroughCopy("favicon*");
44
return {

_data/octicons.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const octicons = require("@primer/octicons");
1+
import octicons from "@primer/octicons";
22

33
// @ts-check
4-
module.exports = {
4+
export default {
55
commentDiscussion: octicons["comment-discussion"].heights[16].path,
66
markGithub: octicons["mark-github"].heights[16].path,
77
};

_data/stages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const EleventyFetch = require("@11ty/eleventy-fetch");
1+
import EleventyFetch from "@11ty/eleventy-fetch";
22

33
function arrayEquals(a, b) {
44
return (
@@ -9,7 +9,7 @@ function arrayEquals(a, b) {
99
);
1010
}
1111

12-
module.exports = async () => {
12+
export default async () => {
1313
const json = await EleventyFetch("https://tc39.es/dataset/proposals.json", {
1414
duration: "1h", // 1 day
1515
type: "json", // also supports "text" or "buffer"

de/de.11tydata.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
module.exports = {
1+
import { createRequire } from "node:module";
2+
3+
const require = createRequire(import.meta.url);
4+
5+
export default {
26
intro: require("./intro.json"),
37
proposals: require("./proposals.json"),
48
site: require("./site.json"),

en/en.11tydata.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
module.exports = {
1+
import { createRequire } from "node:module";
2+
3+
const require = createRequire(import.meta.url);
4+
5+
export default {
26
intro: require("./intro.json"),
37
proposals: require("./proposals.json"),
48
site: require("./site.json"),

fr/fr.11tydata.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
module.exports = {
1+
import { createRequire } from "node:module";
2+
3+
const require = createRequire(import.meta.url);
4+
5+
export default {
26
intro: require("./intro.json"),
37
proposals: require("./proposals.json"),
48
site: require("./site.json"),

ja/ja.11tydata.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
module.exports = {
1+
import { createRequire } from "node:module";
2+
3+
const require = createRequire(import.meta.url);
4+
5+
export default {
26
intro: require("./intro.json"),
37
proposals: require("./proposals.json"),
48
site: require("./site.json"),

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"type": "git",
77
"url": "https://github.com/tc39/tc39.github.io.git"
88
},
9+
"type": "module",
910
"scripts": {
1011
"prebuild": "npm run sass",
1112
"build": "eleventy",

ru/ru.11tydata.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
module.exports = {
1+
import { createRequire } from "node:module";
2+
3+
const require = createRequire(import.meta.url);
4+
5+
export default {
26
intro: require("./intro.json"),
37
proposals: require("./proposals.json"),
48
site: require("./site.json"),

uk/uk.11tydata.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
module.exports = {
1+
import { createRequire } from "node:module";
2+
3+
const require = createRequire(import.meta.url);
4+
5+
export default {
26
intro: require("./intro.json"),
37
proposals: require("./proposals.json"),
48
site: require("./site.json"),

zh-Hans/zh-Hans.11tydata.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
module.exports = {
1+
import { createRequire } from "node:module";
2+
3+
const require = createRequire(import.meta.url);
4+
5+
export default {
26
intro: require("./intro.json"),
37
proposals: require("./proposals.json"),
48
site: require("./site.json"),

0 commit comments

Comments
 (0)