feat: add scripts that on release will publish transpiled template to npm#575
Conversation
There was a problem hiding this comment.
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.
derberg
left a comment
There was a problem hiding this comment.
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
derberg
left a comment
There was a problem hiding this comment.
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.
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.
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.
please put it in between try/catch instead of later catching errors on transpileTemplate
|
|
Done @derberg 👍 |
derberg
left a comment
There was a problem hiding this comment.
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
__transpiledfolder in the root directoryprepublishOnlyscripts that ensures transpilation runs before publishingRelated issue(s)
Fixes #558