Skip to content

Commit 1df90d6

Browse files
committed
change project type to ESM instead of CJS
1 parent f86ff91 commit 1df90d6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { selectAll } = require('unist-util-select');
1+
import { selectAll } from 'unist-util-select';
22

33
const applyClassesToNode = (node, classes) => {
44
node.data = node.data || {};
@@ -10,7 +10,7 @@ const applyClassesToNode = (node, classes) => {
1010
return node;
1111
};
1212

13-
module.exports = ({ markdownAST }, { classMap = {} }) => {
13+
export default ({ markdownAST }, { classMap = {} }) => {
1414
Object.keys(classMap).forEach((selector) => {
1515
const nodes = selectAll(selector, markdownAST);
1616

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@bulletlogic/gatsby-remark-classes",
33
"version": "1.0.3",
44
"description": "Automatically add class attributes to rendered markdown elements",
5+
"type": "module",
56
"main": "index.js",
67
"keywords": [
78
"gatsby",

0 commit comments

Comments
 (0)