0.3.28 • Published 11 days ago

@fluentui/public-docsite-setup v0.3.28

Weekly downloads
-
License
MIT
Repository
github
Last release
11 days ago

@fluentui/public-docsite-setup

This is an internal use only package for sharing bootstrapping and version switching code between different major versions of Fluent/Fabric on https://developer.microsoft.com/fluentui, as well as the local and PR deploy versions of the site. It's consumed from npm by @uifabric/fabric-website in the 7.0, 6.0, and 5.0 branches.

Usage

The most important file in this package is src/loadSite.ts, which handles various bootstrapping tasks for the site. It's intended to be used in your site version via a webpack config as follows.

  1. Ensure webpack 4 or 5 and copy-webpack-plugin >= 4 are installed. (These are not listed in peerDependencies because they're only required when using the getLoadSiteConfig utility, not the types.)

  2. In your webpack config file(s), add the result of getLoadSiteConfig() to your array of exported configs:

    const getLoadSiteConfig = require('@fluentui/public-docsite-setup/scripts/getLoadSiteConfig');
    
    module.exports = [
      getLoadSiteConfig({
        libraryPath: 'path/to/@fluentui/react', // or 'office-ui-fabric-react' if appropriate
        outDir: path.join(__dirname, 'dist'), // full path to output directory
        isProduction: isProductionArg, // whether to do a minified build (filename is the same regardless)
      }),
      ...yourOtherConfigs,
    ];

This should give you two files:

  • [outDir]/index.html: has some basic styling and a reference to loadSite.js
  • [outDir]/loadSite.js does a few setup tasks:
    • Load the rest of the site. For local or PR deploy builds, this will load the locally deployed files starting with [outDir]/[bundleName].js. For the real site, this uses the manifest file (prod or df) for the appropriate major version: latest by default, or a version specified with ?fabricVer.
    • Define window.__versionSwitcherDefinition with metadata for switching between available major versions of the site.
    • Define window.MonacoConfig used by the example editor.
0.3.28

11 days ago

0.3.27

23 days ago

0.3.26

1 month ago

0.3.25

4 months ago

0.3.24

5 months ago

0.3.23

6 months ago

0.3.22

9 months ago

0.3.20

11 months ago

0.3.21

11 months ago

0.3.19

1 year ago

0.3.18

1 year ago

0.3.17

1 year ago

0.3.16

1 year ago

0.3.15

1 year ago

0.3.14

1 year ago

0.3.13

1 year ago

0.3.12

2 years ago

0.3.11

2 years ago

0.3.10

2 years ago

0.3.9

2 years ago

0.3.8

2 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.2

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.0

3 years ago

0.3.1

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago