Skip to content

Commit

Permalink
Merge pull request #9 from iq9891/master
Browse files Browse the repository at this point in the history
v0.2.0
  • Loading branch information
iq9891 authored Dec 13, 2019
2 parents f4e0f5c + 217f101 commit 0a23fd6
Show file tree
Hide file tree
Showing 47 changed files with 24 additions and 2,955 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
<img src="https://static2.evente.cn/static/img/water.gif" alt="自动补全的示例" style="display: block; width: 288px;" />


### 0.1.0 & 0.2.0

> 2019-12-14
- [feat] 新增版本和是否必填的指引。


### 0.0.4

> 2019-12-13
Expand Down
5 changes: 0 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/bash

echo $1
mkdir out
cd out
mkdir maps
cp -r ../src/maps/** ./maps/
cd ..

tsc $1 -p ./
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-water-helper",
"displayName": "vscode-water-helper",
"description": "A vscode extension for WATER",
"version": "0.0.4",
"version": "0.2.0",
"engines": {
"vscode": "^1.40.0"
},
Expand Down Expand Up @@ -71,7 +71,7 @@
"scripts": {
"vscode:prepublish": "yarn run compile",
"compile": "sh build.sh",
"watch": "sh build.sh -watch",
"start": "sh build.sh -watch",
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "node ./out/test/runTest.js",
"lint": "prettier --write --parser typescript \"src/**/*.ts?(x)\""
Expand All @@ -87,7 +87,8 @@
"tslint": "^5.20.0",
"typescript": "^3.6.4",
"vscode": "^1.1.36",
"vscode-test": "^1.2.2"
"vscode-test": "^1.2.2",
"water-helper-maps": "^0.1.0"
},
"dependencies": {
"pretty": "^2.0.0",
Expand Down
12 changes: 8 additions & 4 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ import {
Range,
EventEmitter,
} from 'vscode';
import * as TAGS from './maps/water-tags.json';
import ATTRS from './maps/water-attributes.js';
// import * as TAGS from './maps/water-tags.json';
// import ATTRS from './maps/water-attributes.js';
import * as TAGS from 'water-helper-maps/out/maps/water-tags.json';
import ATTRS from 'water-helper-maps/out/maps/water-attributes.js';

const PANEL_NAME = 'Water Vue';

Expand Down Expand Up @@ -325,16 +327,18 @@ export class WaterCompletionItemProvider implements CompletionItemProvider {

buildAttrSuggestion(
{ attr, tag, bind, method },
{ description, type, optionType, defaultValue }
{ description, type, optionType, defaultValue, version, require }
) {
if (
(method && type === 'method') ||
(bind && type !== 'method') ||
(!method && !bind)
) {
let documentation = description;
optionType && (documentation += '\n' + `type: ${optionType}`);
optionType && (documentation += '\n\n' + `type: ${optionType}`);
defaultValue && (documentation += '\n' + `default: ${defaultValue}`);
require && (documentation += '\n' + `require: ${require}`);
version && (documentation += '\n' + `version: ${version}`);
return {
label: attr,
insertText:
Expand Down
37 changes: 0 additions & 37 deletions src/maps/attrs/affix/affix.json

This file was deleted.

45 changes: 0 additions & 45 deletions src/maps/attrs/badge/badge.json

This file was deleted.

27 changes: 0 additions & 27 deletions src/maps/attrs/breadcrumb/breadcrumb-item.json

This file was deleted.

12 changes: 0 additions & 12 deletions src/maps/attrs/button/button-group.json

This file was deleted.

58 changes: 0 additions & 58 deletions src/maps/attrs/button/button.json

This file was deleted.

59 changes: 0 additions & 59 deletions src/maps/attrs/calendar/calendar.json

This file was deleted.

Loading

0 comments on commit 0a23fd6

Please sign in to comment.