Skip to content

compiles. that's it. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
!dist/**/*
test/
dist/test/
package/
.npmignore
tsconfig.json
*.ts
!*.d.ts
*.tgz
.vscode
.scripts
17 changes: 16 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

console.log("hi");
import { AutoRestExtension, } from "@microsoft.azure/autorest-extension-base";
import { process as normalizer } from "./normalizer/main";

async function main() {
const pluginHost = new AutoRestExtension();

pluginHost.Add("normalizer", normalizer);

await pluginHost.Run();
}

main();
18 changes: 18 additions & 0 deletions normalizer/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Host } from "@microsoft.azure/autorest-extension-base";

export async function process(service: Host) {
// Get the list of files
const files = await service.ListInputs();

//
for (const file of files) {
const openapiDefinitionDocument = await service.ReadFile(file);

}


// Get the code model
// const codeModel: CodeModel = load(await service.GetValue("code-model-v1.yaml"));


}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"typescript": "^2.6.1"
},
"dependencies": {
"@microsoft.azure/tasks": "^2.0.12"
"@microsoft.azure/tasks": "^2.0.12",
"@microsoft.azure/autorest-extension-base": "1.0.13"
}
}