Skip to content

Commit a532457

Browse files
committed
fix: fix the ShellGrammars exports
1 parent 2ace5e6 commit a532457

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

lib/grammars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import perl from "./grammars/perl"
1818
import php from "./grammars/php"
1919
import * as python from "./grammars/python"
2020
import ruby from "./grammars/ruby"
21-
import * as shell from "./grammars/shell"
21+
import shell from "./grammars/shell"
2222
import * as windows from "./grammars/windows"
2323

2424
const Grammars = {

lib/grammars/shell.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import GrammarUtils from "../grammar-utils"
44

5-
exports["Bash Automated Test System (Bats)"] = {
5+
const Bats = {
66
"Selection Based": {
77
command: "bats",
88
args(context) {
@@ -20,7 +20,7 @@ exports["Bash Automated Test System (Bats)"] = {
2020
},
2121
}
2222

23-
export const Bash = {
23+
const Bash = {
2424
"Selection Based": {
2525
command: process.env.SHELL,
2626
args(context) {
@@ -36,9 +36,9 @@ export const Bash = {
3636
},
3737
}
3838

39-
exports["Shell Script"] = exports.Bash
39+
const Shell = Bash
4040

41-
exports["Shell Script (Fish)"] = {
41+
const Fish = {
4242
"Selection Based": {
4343
command: "fish",
4444
args(context) {
@@ -54,7 +54,7 @@ exports["Shell Script (Fish)"] = {
5454
},
5555
}
5656

57-
export const Tcl = {
57+
const Tcl = {
5858
"Selection Based": {
5959
command: "tclsh",
6060
args(context) {
@@ -71,3 +71,12 @@ export const Tcl = {
7171
},
7272
},
7373
}
74+
75+
const ShellGrammars = {
76+
"Bash Automated Test System (Bats)": Bats,
77+
Bash,
78+
Tcl,
79+
"Shell Script": Shell,
80+
"Shell Script (Fish)": Fish,
81+
}
82+
export default ShellGrammars

0 commit comments

Comments
 (0)