-
-
Notifications
You must be signed in to change notification settings - Fork 59
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: add scripts that on release will publish transpiled template to npm #575
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we actually need to modify copy sources script as we in the end publish entire package, not only template folder. Copy sources is needed only for specific thing.
So yeah, package.json script modification should be enough. Only one more change is needed - _trabspiled is in gitignore, so by default will not be pushed to npm,so you need to modify package.json so it accepts _trabspile folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just some code improvements please
scripts/transpile.js
Outdated
|
||
async function transpileTemplate() { | ||
const templateContentDir = path.join(__dirname, '../template'); | ||
console.log("templateContentDir",templateContentDir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add full sentence console log
scripts/transpile.js
Outdated
async function transpileTemplate() { | ||
const templateContentDir = path.join(__dirname, '../template'); | ||
console.log("templateContentDir",templateContentDir) | ||
const outputDir = path.join(__dirname, '../__transpiled'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console log this variable as well, but again, with full descriptive console log info
scripts/transpile.js
Outdated
const templateContentDir = path.join(__dirname, '../template'); | ||
console.log("templateContentDir",templateContentDir) | ||
const outputDir = path.join(__dirname, '../__transpiled'); | ||
await transpileFiles(templateContentDir, outputDir, {recursive: true}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please put it in between try/catch instead of later catching errors on transpileTemplate
Quality Gate passedIssues Measures |
Done @derberg 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, lets merge and see if transpiled files end up in a package and if it makes any difference
/rtm |
🎉 This PR is included in version 2.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@asyncapi/bounty_team |
🎉 This issue has been resolved in version 2.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
__transpiled
folder in the root directoryprepublishOnly
scripts that ensures transpilation runs before publishingRelated issue(s)
Fixes #558