mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
task 支持运行 mjs 文件
This commit is contained in:
parent
624c9374e5
commit
0bf28e9ab3
|
@ -14,7 +14,7 @@ single_hanle() {
|
||||||
## 选择python3还是node
|
## 选择python3还是node
|
||||||
define_program() {
|
define_program() {
|
||||||
local file_param=$1
|
local file_param=$1
|
||||||
if [[ $file_param == *.js ]]; then
|
if [[ $file_param == *.js ]] || [[ $file_param == *.mjs ]]; then
|
||||||
which_program="node"
|
which_program="node"
|
||||||
elif [[ $file_param == *.py ]] || [[ $file_param == *.pyc ]]; then
|
elif [[ $file_param == *.py ]] || [[ $file_param == *.pyc ]]; then
|
||||||
which_program="python3"
|
which_program="python3"
|
||||||
|
|
|
@ -49,6 +49,7 @@ const tabList = [
|
||||||
const LangMap: any = {
|
const LangMap: any = {
|
||||||
'.py': 'python',
|
'.py': 'python',
|
||||||
'.js': 'javascript',
|
'.js': 'javascript',
|
||||||
|
'.mjs': 'javascript',
|
||||||
'.sh': 'shell',
|
'.sh': 'shell',
|
||||||
'.ts': 'typescript',
|
'.ts': 'typescript',
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,6 +14,7 @@ const { Option } = Select;
|
||||||
const LangMap: any = {
|
const LangMap: any = {
|
||||||
'.py': 'python',
|
'.py': 'python',
|
||||||
'.js': 'javascript',
|
'.js': 'javascript',
|
||||||
|
'.mjs': 'javascript',
|
||||||
'.sh': 'shell',
|
'.sh': 'shell',
|
||||||
'.ts': 'typescript',
|
'.ts': 'typescript',
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,6 +49,7 @@ const { Text } = Typography;
|
||||||
const LangMap: any = {
|
const LangMap: any = {
|
||||||
'.py': 'python',
|
'.py': 'python',
|
||||||
'.js': 'javascript',
|
'.js': 'javascript',
|
||||||
|
'.mjs': 'javascript',
|
||||||
'.sh': 'shell',
|
'.sh': 'shell',
|
||||||
'.ts': 'typescript',
|
'.ts': 'typescript',
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user