Skip to content

Commit 7cd61d0

Browse files
staging to switch workstations
1 parent 198cdca commit 7cd61d0

File tree

6 files changed

+26
-11
lines changed

6 files changed

+26
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [0.2.0](https://github.com/run-at-scale/vscode-terraform-doc-snippets/compare/v0.1.5...v0.2.0) (2018-05-10)
6+
7+
* override and extra snippets now added through config
8+
* tests added
9+
510
## [0.1.5](https://github.com/run-at-scale/vscode-terraform-doc-snippets/compare/v0.1.4...v0.1.5) (2018-05-04)
611

712
* gif (🔊 Jiff 🔊) demo added to readme
@@ -19,7 +24,7 @@ All notable changes to this project will be documented in this file. See [standa
1924

2025
## [0.1.2](https://github.com/run-at-scale/vscode-terraform-doc-snippets/compare/v0.1.1...v0.1.2) (2018-04-26)
2126

22-
* markdown files are sometimes supplied as `.md` and othertimes `.markdown`. The code now handles both.
27+
* markdown files are sometimes supplied as `.md` and other times `.markdown`. The code now handles both.
2328

2429
## [0.1.1](https://github.com/run-at-scale/vscode-terraform-doc-snippets/compare/v0.0.4...v0.1.1) (2018-04-26)
2530

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "terraform-doc-snippets",
33
"displayName": "Terraform doc snippets",
4-
"description": "Terraform code snippets (>1400) straight from documentation for all provider resources and data sources. All providers in the terraform-providers org covered.",
5-
"version": "0.1.5",
4+
"description":
5+
"Terraform code snippets (>1400) straight from documentation for all provider resources and data sources. All providers in the terraform-providers org covered.",
6+
"version": "0.2.0",
67
"icon": "assets/terraform_logo.png",
78
"publisher": "run-at-scale",
89
"license": "MIT",
@@ -14,9 +15,7 @@
1415
"email": "brandon@atscale.run",
1516
"url": "https://github.com/run-at-scale"
1617
},
17-
"categories": [
18-
"Snippets"
19-
],
18+
"categories": ["Snippets"],
2019
"keywords": [
2120
"Terraform",
2221
"devops",

src/main.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ import { writeFileSync } from "fs";
22
import { cleanup } from "./cleanup";
33
import { downloadGitRepo } from "./downloadGitRepo";
44
import { getAvailableProviders } from "./getAvailableProviders";
5+
import { setOverrides } from "./setOverrides";
6+
import { sortObject } from "./sortObject";
57
import setup = require("./setup");
68

79
const cap = 1452;
8-
function sortObject(o) {
9-
return Object.keys(o)
10-
.sort()
11-
.reduce((r, k) => ((r[k] = o[k]), r), {});
12-
}
1310

1411
async function main() {
1512
const tmpDir = setup.setupWorkspace();
@@ -22,6 +19,7 @@ async function main() {
2219
await sleep(20);
2320
}
2421
console.log(Object.keys(snips).length);
22+
2523
const sortedSnips = sortObject(snips);
2624
writeFileSync(
2725
"snippets/terraform.json",

src/setOverrides.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// https://github.com/chybie/ts-json/blob/master/app.ts
2+
var json = require("./config.json");
3+
4+
export function setOverrides(o) {}

src/sortObject.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export function sortObject(o) {
2+
return Object.keys(o)
3+
.sort()
4+
.reduce((r, k) => ((r[k] = o[k]), r), {});
5+
}

src/typings.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module "*.json" {
2+
const value: any;
3+
export default value;
4+
}

0 commit comments

Comments
 (0)