-
Notifications
You must be signed in to change notification settings - Fork 169
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
[Release] Stage to Main #2943
[Release] Stage to Main #2943
Changes from all commits
3557dd6
58b3850
f70f94b
3f86947
75fa60c
d1f6547
5ddeb73
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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.
milo/libs/blocks/faas-config/faas-config.js Line 374 in 3f86947
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.
milo/libs/blocks/faas-config/faas-config.js Line 459 in 3f86947
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
header { | ||
display: none; | ||
} | ||
|
||
.home { | ||
display: grid; | ||
position: relative; | ||
|
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.
|
Large diffs are not rendered by default.
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.
|
Large diffs are not rendered by default.
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.
|
Large diffs are not rendered by default.
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.
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// build-docs.mjs | ||
|
||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import markdownIt from 'markdown-it'; | ||
import markdownItAttrs from 'markdown-it-attrs'; | ||
import markdownItAnchor from 'markdown-it-anchor'; | ||
import markdownItContainer from 'markdown-it-container'; | ||
import markdownItHighlightjs from 'markdown-it-highlightjs'; | ||
|
||
// Reconstruct __dirname and __filename in ES6 modules | ||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
|
||
const sourceFile = process.argv[2]; | ||
if (!sourceFile) { | ||
console.error('Please provide a source file as an argument'); | ||
process.exit(1); | ||
} | ||
|
||
const targetFile = process.argv[3]; | ||
if (!targetFile) { | ||
console.error('Please provide a target file as an argument'); | ||
process.exit(1); | ||
} | ||
|
||
const skipMas = process.argv.includes('--skip-mas'); | ||
|
||
// Initialize markdown-it with desired plugins | ||
const md = markdownIt({ | ||
html: true, | ||
linkify: true, | ||
typographer: true, | ||
}) | ||
.use(markdownItAttrs) | ||
.use(markdownItAnchor, { | ||
permalink: markdownItAnchor.permalink.headerLink(), | ||
}) | ||
.use(markdownItContainer, 'warning') | ||
.use(markdownItHighlightjs); | ||
|
||
// Define input and output paths | ||
const inputPath = path.join(__dirname, sourceFile); | ||
const outputPath = path.join(targetFile); | ||
|
||
// Read the Markdown file | ||
const inputContent = fs.readFileSync(inputPath, 'utf8'); | ||
|
||
// Render Markdown to HTML | ||
const htmlContent = md.render(inputContent); | ||
|
||
const masJs = skipMas | ||
? '' | ||
: '<script type="module" src="../../../deps/mas/mas.js"></script>'; | ||
|
||
// HTML template with your custom element script | ||
const htmlTemplate = ` | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Custom Element Documentation</title> | ||
<!-- Include your custom element script as an ES6 module --> | ||
<script src="../../../features/spectrum-web-components/dist/theme.js" type="module"></script> | ||
<script src="../../../features/spectrum-web-components/dist/button.js" type="module"></script> | ||
${masJs} | ||
<!-- Include Highlight.js stylesheet for syntax highlighting --> | ||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css"> | ||
<!-- Include any additional stylesheets --> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
<main> | ||
<sp-theme color="light" scale="medium"> | ||
${htmlContent} | ||
</sp-theme> | ||
</main> | ||
</body> | ||
</html> | ||
`; | ||
|
||
// Write the HTML file | ||
fs.writeFileSync(outputPath, htmlTemplate, 'utf8'); | ||
console.log('Documentation generated at', outputPath); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# Build documentation for commerce/checkout-link.md and output to docs/checkout-link.html | ||
node build-docs.mjs commerce/checkout-link.md docs/checkout-link.html | ||
|
||
# Build documentation for mas/mas.md and output to docs/mas.html | ||
node build-docs.mjs mas/mas.md docs/mas.html | ||
|
||
# Build documentation for mas/mas.js.md and output to docs/mas.js.html, does not include mas.js in the generated html | ||
node build-docs.mjs mas/mas.js.md docs/mas.js.html --skip-mas |
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.
Unexpected console statement.
milo/libs/blocks/faas-config/faas-config.js
Line 98 in 3f86947