Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Convert to ESM #63

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.nyc_output/
coverage
.hubot_history
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

A hubot script to persist hubot's brain using redis

See [`src/redis-brain.js`](src/redis-brain.js) for full documentation.
See [`src/RedisBrain.js`](src/RedisBrain.js) for full documentation.

## Installation

Expand Down
8 changes: 0 additions & 8 deletions index.js

This file was deleted.

10 changes: 10 additions & 0 deletions index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict'

import path from 'node:path'
import { fileURLToPath } from 'node:url'

const __dirname = path.dirname(fileURLToPath(import.meta.url))
export default (robot) => {
const scriptsPath = path.resolve(__dirname, 'src')
robot.loadFile(scriptsPath, 'RedisBrain.mjs')
}
Loading