MCPcopy Create free account
hub / github.com/adobe/react-spectrum / scaffoldS2Docs

Function scaffoldS2Docs

scripts/changelog.js:124–158  ·  view source on GitHub ↗
({version, dateYMD, tag, body, commitCount})

Source from the content-addressed store, hash-verified

122}
123
124function scaffoldS2Docs({version, dateYMD, tag, body, commitCount}) {
125 let year = new Date().getFullYear();
126 return `${licenseHeader(year)}
127
128import {InstallCommand} from '../../../src/InstallCommand';
129
130import {Layout} from '../../../src/Layout';
131export default Layout;
132
133import docs from 'docs:@react-spectrum/s2';
134
135export const hideNav = true;
136export const section = 'Releases';
137export const tags = ['release', '${tag}'];
138export const date = '${prettyDate(dateYMD)}';
139export const title = 'v${version}';
140export const description = '[TODO: 1–2 sentence highlights summary]';
141export const isSubpage = true;
142
143# v${version}
144
145[TODO: intro paragraph]
146
147{/* Commits: ${commitCount} */}
148## Changelog
149
150${body}
151
152## Released packages
153
154\`\`\`
155[TODO: paste output of yarn bumpVersions here]
156\`\`\`
157`;
158}
159
160function resolveTag(pkgName, pkgVersion) {
161 let exact = `${pkgName}@${pkgVersion}`;

Callers 1

runFunction · 0.85

Calls 2

licenseHeaderFunction · 0.85
prettyDateFunction · 0.85

Tested by

no test coverage detected