- Node 16 and up
Install dependencies
npm installRun the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.
The regular build keeps expensive or deployment-specific artifacts out of local page generation:
npm run buildThe sitemap is generated by the Azure Pipelines master build before static export:
npm run build:ciStatic export snapshots are uploaded by azure-pipelines.yml after the build succeeds. Pull request builds also receive a GitHub comment with the uploaded snapshot path. Configure these Azure Pipeline variables:
DEPLOYMENT_SERVERDEPLOY_TOKENGITHUB_SERVICE_CONNECTION
Master builds run npm run build:ci, upload the generated static export, and purge the documentation CDN.
Playground and editor preview snapshots are generated only when explicitly requested. To see which snapshots are missing without launching a browser:
npm run check:example-imagesTo generate missing snapshots under public/img/playgroundsAndNMEs, run:
npm run build:example-imagesUseful options:
npm run build:example-images -- --dry-run
npm run build:example-images -- --dry-run --strictGenerated snapshot images are normal static assets and should be reviewed and committed when intentional.
Markdowns can now be augmented with special components. For example, adding:
<Playground id="#Y642I8" title="Tinted Shadows Example" description="A Playground example of tinted shadows." />will add a playground to the examples pane, allow to show its preview, add a styled link and add it to the search index for the playground. This will also generate images for this playground's preview when needed. Please make sure to commit those images.
Documentation for all markdown components is coming soon.