Skip to content
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

feat: migration of the codebase to TypeScript (#56) #66

Merged
merged 5 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add fixes
  • Loading branch information
magicmatatjahu authored and aeworxet committed Oct 4, 2022
commit 5adcd18cab12a370ad844d2284fa72d2b086d108
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
/lib
8 changes: 4 additions & 4 deletions example/bundle.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as bundle from '@asyncapi/bundler';
import * as fs from 'fs';
import { readFileSync, writeFileSync } from 'fs';
import bundle from '@asyncapi/bundler';

async function main() {
const document = bundle([fs.readFileSync('./main.yaml', 'utf-8')], {
const document = bundle([readFileSync('./main.yaml', 'utf-8')], {
referenceIntoComponents: true,
});
fs.writeFileSync('asyncapi.yaml', document.yml());
writeFileSync('asyncapi.yaml', document.yml());
}

main().catch(e => console.error(e));
73 changes: 62 additions & 11 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@asyncapi/bundler": "^0.2.2",
"@asyncapi/bundler": "../",
"@types/node": "^18.7.23"
}
}
Loading