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

Convert the package to .mjs #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 0 additions & 4 deletions index.js

This file was deleted.

4 changes: 4 additions & 0 deletions index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import LocalEchoController from "./lib/LocalEchoController.mjs";
export { HistoryController } from './lib/HistoryController.mjs';

export default LocalEchoController;
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/LocalEchoController.js → lib/LocalEchoController.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HistoryController } from "./HistoryController";
import { HistoryController } from "./HistoryController.mjs";
import {
closestLeftBoundary,
closestRightBoundary,
Expand All @@ -8,7 +8,7 @@ import {
hasTailingWhitespace,
isIncompleteInput,
offsetToColRow
} from "./Utils";
} from "./Utils.mjs";

/**
* A local terminal controller is responsible for displaying messages
Expand Down
3 changes: 2 additions & 1 deletion lib/Utils.js → lib/Utils.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { parse } from "shell-quote";
import * as ShellQuote from "shell-quote";
const { parse } = ShellQuote;

/**
* Detects all the word boundaries on the given input
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "local-echo",
"version": "0.2.0",
"description": "A local echo controller for xterm.js",
"main": "index.js",
"type": "module",
"main": "./index.mjs",
"scripts": {
"test": "jest",
"build": "webpack"
Expand Down