Skip to content

Commit

Permalink
Merge pull request #105 from belsman/chore/add-version-number-to-vcl-…
Browse files Browse the repository at this point in the history
…document

chore: add version number to the vcl document
  • Loading branch information
vanthome committed Nov 14, 2023
2 parents 6e2830c + 937f742 commit 83e53f5
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 383 deletions.
9 changes: 7 additions & 2 deletions docgen/vcl.github.io/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const rawHtml = exports.rawHtml = fs.readFileSync(__dirname + '/build/dist/index
const appBundle = fs.readFileSync(__dirname + '/build/dist/web-components/doc-index.js', 'utf8');
const polyfillBundle = fs.readFileSync(__dirname + '/build/dist/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js', 'utf8');


const lernaPckJSON = fs.readFileSync(path.join(__dirname, '..', '..', 'lerna.json'), 'utf8');
const version = JSON.parse(lernaPckJSON).version;

if (verbose) {
debug.enabled = true;
}
Expand Down Expand Up @@ -131,13 +135,14 @@ const render = (data) => {
const parts = await Promise.all(parts$);
const doc = {
name,
version,
basePath: '',
packages,
parts,
};

const inlineScript = '\nwindow.doc = ' + JSON.stringify(doc, null, 3) + ';';

const prodStuff = [
'<script>',
inlineScript,
Expand Down

0 comments on commit 83e53f5

Please sign in to comment.