update
parent
50f5f457ec
commit
175f984709
|
@ -1,5 +1,7 @@
|
|||
# 更新日志
|
||||
|
||||
## [1.0.2] 2018-12-23
|
||||
- 执行优化。
|
||||
|
||||
## [1.0.1] 2018-12-21
|
||||
- 增加对json文件的支持。
|
||||
|
|
13
README.md
13
README.md
|
@ -2,6 +2,11 @@
|
|||
> 🔥 类似sublime的Build System功能, 方便快速调试一些代码片断或想法。
|
||||
>> 目前只支持少数语言的简单编译调试, 因为vscode原则上只是一个编辑器, 我并不希望把它变成一个IDE, 所以暂时并不打算支持那些需要复杂的编译环境及配置的语言。
|
||||
|
||||
[![Version](https://vsmarketplacebadge.apphb.com/version-short/yutent.build-system.svg)](https://marketplace.visualstudio.com/items?itemName=yutent.build-system)
|
||||
[![Rating](https://vsmarketplacebadge.apphb.com/rating-short/yutent.build-system.svg)](https://marketplace.visualstudio.com/items?itemName=yutent.build-system)
|
||||
[![Installs](https://vsmarketplacebadge.apphb.com/installs/yutent.build-system.svg)](https://marketplace.visualstudio.com/items?itemName=yutent.build-system)
|
||||
[![Build Status](https://travis-ci.org/yutent/build-system.svg?branch=master)](https://travis-ci.org/yutent/build-system)
|
||||
|
||||
目前支持的语言有以下:
|
||||
> - .bat
|
||||
> - .dart
|
||||
|
@ -15,14 +20,6 @@
|
|||
>> 除以上内置的以外, 还支持代码文件内首行以 `#!`开关的环境配置(优先级高于插件内置)
|
||||
|
||||
|
||||
|
||||
[![Version](https://vsmarketplacebadge.apphb.com/version-short/yutent.build-system.svg)](https://marketplace.visualstudio.com/items?itemName=yutent.build-system)
|
||||
[![Rating](https://vsmarketplacebadge.apphb.com/rating-short/yutent.build-system.svg)](https://marketplace.visualstudio.com/items?itemName=yutent.build-system)
|
||||
[![Installs](https://vsmarketplacebadge.apphb.com/installs/yutent.build-system.svg)](https://marketplace.visualstudio.com/items?itemName=yutent.build-system)
|
||||
[![Build Status](https://travis-ci.org/yutent/build-system.svg?branch=master)](https://travis-ci.org/yutent/build-system)
|
||||
|
||||
|
||||
|
||||
![demo](./demo.png)
|
||||
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ const BuildSystem = {
|
|||
return true
|
||||
})
|
||||
.then(saved => {
|
||||
log(this.__DOC__, saved)
|
||||
if (saved) {
|
||||
this.__start__()
|
||||
}
|
||||
|
@ -91,7 +90,6 @@ const BuildSystem = {
|
|||
__start__() {
|
||||
this.__parseCmd__()
|
||||
|
||||
log(this.__CMD__)
|
||||
if (!this.__CMD__) {
|
||||
return
|
||||
}
|
||||
|
@ -107,7 +105,9 @@ const BuildSystem = {
|
|||
__parseCmd__() {
|
||||
let firstLine = this.__DOC__.lineAt(0).text
|
||||
let ext = path.extname(this.__DOC__.fileName)
|
||||
let file = path.basename(this.__DOC__.fileName)
|
||||
let lang = EXTS[ext]
|
||||
|
||||
if (firstLine.startsWith('#!')) {
|
||||
lang = firstLine.slice(2)
|
||||
}
|
||||
|
@ -122,7 +122,11 @@ const BuildSystem = {
|
|||
}
|
||||
return vsc.window.showInformationMessage('不支持的语言...')
|
||||
}
|
||||
this.__CMD__ = `${lang} "${this.__DOC__.fileName}"`
|
||||
if (ext === '.json') {
|
||||
this.__CMD__ = lang
|
||||
} else {
|
||||
this.__CMD__ = `${lang} "${file}"`
|
||||
}
|
||||
},
|
||||
|
||||
// 在终端内运行
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "build-system",
|
||||
"displayName": "sublime build system",
|
||||
"description": "🔥 类似sublime的Build System功能, 方便快速调试一些代码片断或想法。",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"publisher": "yutent",
|
||||
"author": "Yutent [@yutent]",
|
||||
"icon": "logo.png",
|
||||
|
|
Loading…
Reference in New Issue