diff --git a/README.md b/README.md index 81eff87..7ccfc1d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,15 @@ ## amis vscode plugin -此项目的主要目标是用于提升使用[amis](https://github.com/baidu/amis)进行开发及二次开发的各种项目,在vscode中的开发体验及开发速度 +此项目的主要目标是用于帮助使用[amis](https://github.com/baidu/amis)进行开发及二次开发的各种项目,提升在vscode中开发的体验及效率。 + +自动补全 + +![autocompletion](./pictures/20201009171003.png) + +信息提示 + +![hover](./pictures/20201009171057.png) ## 安装 diff --git a/pictures/20201009171003.png b/pictures/20201009171003.png new file mode 100644 index 0000000..0c1f522 Binary files /dev/null and b/pictures/20201009171003.png differ diff --git a/pictures/20201009171057.png b/pictures/20201009171057.png new file mode 100644 index 0000000..1c31a21 Binary files /dev/null and b/pictures/20201009171057.png differ diff --git a/server/test/suite/index.ts b/server/test/suite/index.ts index a1a5329..c70f8ed 100644 --- a/server/test/suite/index.ts +++ b/server/test/suite/index.ts @@ -6,44 +6,44 @@ import * as glob from 'glob' // const testFiles = '**/+(emmetCompleteTag|autoCloseTag).test.js' // const testFiles = '**/+(emmetCompleteTag).test.js' const files = [ - 'dryrun' + 'dryrun' ] const testFiles = `**/+(${files.join('|')}).test.js` // const testFiles = '**/+(emmetCompleteTag).benchmark.js' export function run(): Promise { - // Create the mocha test - const mocha = new Mocha({ - ui: 'tdd', - timeout: 1000000, - }) + // Create the mocha test + const mocha = new Mocha({ + ui: 'tdd', + timeout: 1000000, + }) - mocha.bail(true) + mocha.bail(true) - const testsRoot = path.resolve(__dirname, '..') + const testsRoot = path.resolve(__dirname, '..') - return new Promise((resolve, reject) => { - glob(testFiles, { cwd: testsRoot }, (err, files) => { - console.log(files) - if (err) { - return reject(err) - } + return new Promise((resolve, reject) => { + glob(testFiles, { cwd: testsRoot }, (err, files) => { + console.log(files) + if (err) { + return reject(err) + } - // Add files to the test suite - files.forEach(f => mocha.addFile(path.resolve(testsRoot, f))) + // Add files to the test suite + files.forEach(f => mocha.addFile(path.resolve(testsRoot, f))) - try { - // Run the mocha test - mocha.run(failures => { - if (failures > 0) { - reject(new Error(`${failures} tests failed.`)) - } else { - resolve() - } + try { + // Run the mocha test + mocha.run(failures => { + if (failures > 0) { + reject(new Error(`${failures} tests failed.`)) + } else { + resolve() + } + }) + } catch (err) { + reject(err) + } }) - } catch (err) { - reject(err) - } }) - }) } \ No newline at end of file