-
-
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
Changes from 6 commits
b822ffd
529f30a
0bdf806
c234399
54ae478
eff727c
e2c420f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,9 @@ | |
], | ||
"author": "Fran Mendez <[email protected]> (fmvilas.com)", | ||
"license": "Apache-2.0", | ||
"files": [ | ||
"__transpiled" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/asyncapi/html-template.git" | ||
|
@@ -30,7 +33,8 @@ | |
"generate:readme:toc": "markdown-toc -i README.md", | ||
"bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION", | ||
"copy:sources": "node ./scripts/copy-sources.js", | ||
"prepublishOnly": "npm run generate:assets", | ||
"prepublishOnly": "npm run generate:assets && npm run transpile", | ||
"transpile": "node ./scripts/transpile.js", | ||
"test": "npm run test:library && npm run test:generator" | ||
}, | ||
"publishConfig": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { transpileFiles } = require('@asyncapi/generator-react-sdk'); | ||
const path = require('path') | ||
|
||
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 commentThe 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 |
||
await transpileFiles(templateContentDir, outputDir, {recursive: true}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
} | ||
|
||
transpileTemplate().catch((err) => console.log('Error during template transpilation:', err)); |
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