1.3.12
Split by Space Reverse Join Sort lines (ascending, case sensitive) PathWithoutBracketsSingularized
This commit is contained in:
parent
b91c5843df
commit
eacebd708f
BIN
type-script-helper-1.3.12.vsix
Normal file
BIN
type-script-helper-1.3.12.vsix
Normal file
Binary file not shown.
19
type-script-helper/LICENSE.md
Normal file
19
type-script-helper/LICENSE.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) Twitter Inc
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
@ -102,3 +102,11 @@ Learned npm install will do similar to nuget restore
|
|||||||
Learned npm audit fix
|
Learned npm audit fix
|
||||||
Learned npm audit fix --force
|
Learned npm audit fix --force
|
||||||
Learned npm run compile will do similar to build
|
Learned npm run compile will do similar to build
|
||||||
|
|
||||||
|
Quick Fix - Instance Field to Calisthenics
|
||||||
|
|
||||||
|
## 1.3.12
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Split by Space Reverse Join Sort lines (ascending, case sensitive)
|
||||||
|
PathWithoutBracketsSingularized
|
4
type-script-helper/package-lock.json
generated
4
type-script-helper/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "type-script-helper",
|
"name": "type-script-helper",
|
||||||
"version": "1.3.11",
|
"version": "1.3.12",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "type-script-helper",
|
"name": "type-script-helper",
|
||||||
"version": "1.3.11",
|
"version": "1.3.12",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/glob": "^7.1.1",
|
"@types/glob": "^7.1.1",
|
||||||
"@types/mocha": "^5.2.7",
|
"@types/mocha": "^5.2.7",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"description": "Helper for VS Code in TypeScript",
|
"description": "Helper for VS Code in TypeScript",
|
||||||
"publisher": "IFX",
|
"publisher": "IFX",
|
||||||
"repository": "https://github.com/mikepharesjr/YO-VSCode/tree/master/type-script-helper",
|
"repository": "https://github.com/mikepharesjr/YO-VSCode/tree/master/type-script-helper",
|
||||||
"version": "1.3.11",
|
"version": "1.3.12",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.40.0"
|
"vscode": "^1.40.0"
|
||||||
},
|
},
|
||||||
@ -32,6 +32,7 @@
|
|||||||
"onCommand:replaceLinesHelper.removeComment",
|
"onCommand:replaceLinesHelper.removeComment",
|
||||||
"onCommand:replaceLinesHelper.sortLength",
|
"onCommand:replaceLinesHelper.sortLength",
|
||||||
"onCommand:replaceLinesHelper.sortNormal",
|
"onCommand:replaceLinesHelper.sortNormal",
|
||||||
|
"onCommand:replaceLinesHelper.splitBySpaceReverseJoinSort",
|
||||||
"onCommand:replaceLinesHelper.unwrapSql",
|
"onCommand:replaceLinesHelper.unwrapSql",
|
||||||
"onCommand:replaceLinesHelper.wrapSqlCSharp",
|
"onCommand:replaceLinesHelper.wrapSqlCSharp",
|
||||||
"onCommand:replaceLinesHelper.wrapSqlVB"
|
"onCommand:replaceLinesHelper.wrapSqlVB"
|
||||||
@ -114,6 +115,10 @@
|
|||||||
"command": "replaceLinesHelper.sortNormal",
|
"command": "replaceLinesHelper.sortNormal",
|
||||||
"title": "My Sort lines (ascending, case sensitive)"
|
"title": "My Sort lines (ascending, case sensitive)"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"command": "replaceLinesHelper.splitBySpaceReverseJoinSort",
|
||||||
|
"title": "Split by Space Reverse Join Sort lines (ascending, case sensitive)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"command": "replaceLinesHelper.unwrapSql",
|
"command": "replaceLinesHelper.unwrapSql",
|
||||||
"title": "Un-wrap Sql"
|
"title": "Un-wrap Sql"
|
||||||
|
@ -55,6 +55,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
vscode.commands.registerCommand('replaceLinesHelper.removeComment', replaceLinesHelper.removeComment),
|
vscode.commands.registerCommand('replaceLinesHelper.removeComment', replaceLinesHelper.removeComment),
|
||||||
vscode.commands.registerCommand('replaceLinesHelper.sortLength', replaceLinesHelper.sortLength),
|
vscode.commands.registerCommand('replaceLinesHelper.sortLength', replaceLinesHelper.sortLength),
|
||||||
vscode.commands.registerCommand('replaceLinesHelper.sortNormal', replaceLinesHelper.sortNormal),
|
vscode.commands.registerCommand('replaceLinesHelper.sortNormal', replaceLinesHelper.sortNormal),
|
||||||
|
vscode.commands.registerCommand('replaceLinesHelper.splitBySpaceReverseJoinSort', replaceLinesHelper.splitBySpaceReverseJoinSort),
|
||||||
vscode.commands.registerCommand('replaceLinesHelper.unwrapSql', replaceLinesHelper.unwrapSql),
|
vscode.commands.registerCommand('replaceLinesHelper.unwrapSql', replaceLinesHelper.unwrapSql),
|
||||||
vscode.commands.registerCommand('replaceLinesHelper.wrapSqlCSharp', replaceLinesHelper.wrapSqlCSharp),
|
vscode.commands.registerCommand('replaceLinesHelper.wrapSqlCSharp', replaceLinesHelper.wrapSqlCSharp),
|
||||||
vscode.commands.registerCommand('replaceLinesHelper.wrapSqlVB', replaceLinesHelper.wrapSqlVB)
|
vscode.commands.registerCommand('replaceLinesHelper.wrapSqlVB', replaceLinesHelper.wrapSqlVB)
|
||||||
|
@ -87,7 +87,7 @@ function codeGeneratorQuickPickLogic(): undefined {
|
|||||||
}, {
|
}, {
|
||||||
label: "Path without Brackets (Singularized)",
|
label: "Path without Brackets (Singularized)",
|
||||||
detail: "",
|
detail: "",
|
||||||
output: "%PathWithoutBracketSingularized%"
|
output: "%PathWithoutBracketsSingularized%"
|
||||||
}, {
|
}, {
|
||||||
label: "Suggested Type",
|
label: "Suggested Type",
|
||||||
detail: "Type based on values in *.json file",
|
detail: "Type based on values in *.json file",
|
||||||
|
@ -21,6 +21,7 @@ enum LinesAction {
|
|||||||
removeComment,
|
removeComment,
|
||||||
sortLength,
|
sortLength,
|
||||||
sortNormal,
|
sortNormal,
|
||||||
|
splitBySpaceReverseJoinSort,
|
||||||
unwrapSql,
|
unwrapSql,
|
||||||
wrapSqlCSharp,
|
wrapSqlCSharp,
|
||||||
wrapSqlVB
|
wrapSqlVB
|
||||||
@ -282,6 +283,23 @@ function sortNormalLogic(lines: string[]): void {
|
|||||||
lines = transformers.reduce((currentLines, transform) => transform(currentLines), lines);
|
lines = transformers.reduce((currentLines, transform) => transform(currentLines), lines);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function splitBySpaceReverseJoinSortLogic(lines: string[]): void {
|
||||||
|
var transformers: ArrayTransformer[] = [];
|
||||||
|
transformers.push(makeSorter());
|
||||||
|
|
||||||
|
for (let i = 0; i < lines.length; ++i) {
|
||||||
|
lines[i] = lines[i].split(' ').reverse().join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
removeBlanks(lines);
|
||||||
|
|
||||||
|
for (let i = 0; i < lines.length; ++i) {
|
||||||
|
lines[i] = lines[i].split(' ').reverse().join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
lines = transformers.reduce((currentLines, transform) => transform(currentLines), lines);
|
||||||
|
}
|
||||||
|
|
||||||
function unwrapSqlLogic(lines: string[]): void {
|
function unwrapSqlLogic(lines: string[]): void {
|
||||||
for (let i = 0; i < lines.length; ++i) {
|
for (let i = 0; i < lines.length; ++i) {
|
||||||
lines[i] = "//" + lines[i].
|
lines[i] = "//" + lines[i].
|
||||||
@ -384,6 +402,7 @@ function linesFunction(linesAction: LinesAction): Thenable<boolean> | undefined
|
|||||||
case LinesAction.removeComment: { removeCommentLogic(lines); break; }
|
case LinesAction.removeComment: { removeCommentLogic(lines); break; }
|
||||||
case LinesAction.sortLength: { sortLengthLogic(lines); break; }
|
case LinesAction.sortLength: { sortLengthLogic(lines); break; }
|
||||||
case LinesAction.sortNormal: { sortNormalLogic(lines); break; }
|
case LinesAction.sortNormal: { sortNormalLogic(lines); break; }
|
||||||
|
case LinesAction.splitBySpaceReverseJoinSort: { splitBySpaceReverseJoinSortLogic(lines); break; }
|
||||||
case LinesAction.unwrapSql: { unwrapSqlLogic(lines); break; }
|
case LinesAction.unwrapSql: { unwrapSqlLogic(lines); break; }
|
||||||
case LinesAction.wrapSqlCSharp: { wrapSqlCSharpLogic(lines); break; }
|
case LinesAction.wrapSqlCSharp: { wrapSqlCSharpLogic(lines); break; }
|
||||||
case LinesAction.wrapSqlVB: { wrapSqlVBLogic(lines); break; }
|
case LinesAction.wrapSqlVB: { wrapSqlVBLogic(lines); break; }
|
||||||
@ -409,6 +428,7 @@ export const pdsfToFixedWidth = () => linesFunction(LinesAction.pdsfToFixedWidth
|
|||||||
export const removeComment = () => linesFunction(LinesAction.removeComment);
|
export const removeComment = () => linesFunction(LinesAction.removeComment);
|
||||||
export const sortLength = () => linesFunction(LinesAction.sortLength);
|
export const sortLength = () => linesFunction(LinesAction.sortLength);
|
||||||
export const sortNormal = () => linesFunction(LinesAction.sortNormal);
|
export const sortNormal = () => linesFunction(LinesAction.sortNormal);
|
||||||
|
export const splitBySpaceReverseJoinSort = () => linesFunction(LinesAction.splitBySpaceReverseJoinSort);
|
||||||
export const unwrapSql = () => linesFunction(LinesAction.unwrapSql);
|
export const unwrapSql = () => linesFunction(LinesAction.unwrapSql);
|
||||||
export const wrapSqlCSharp = () => linesFunction(LinesAction.wrapSqlCSharp);
|
export const wrapSqlCSharp = () => linesFunction(LinesAction.wrapSqlCSharp);
|
||||||
export const wrapSqlVB = () => linesFunction(LinesAction.wrapSqlVB);
|
export const wrapSqlVB = () => linesFunction(LinesAction.wrapSqlVB);
|
Loading…
x
Reference in New Issue
Block a user