![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@uifabric/example-app-base
Advanced tools
Fluent UI React components for building documentation sites.
Components and utilities used to build internal documentation sites and inner loops for various Fluent UI React (formerly Office UI Fabric React) packages.
This package is in maintenance mode while we work on a replacement. It should only be used in new projects if you must have a published documentation site that looks like the official Fluent UI React docs. If all you need is an inner loop for component development, please use Storybook instead. Storybook is a well-supported, well-documented platform for component development and documentation.
To set up the live code editor in the demo app for a package other than the @fluentui/react
package itself:
Follow the setup steps from the @uifabric/monaco-editor
readme (the helpers mentioned are also re-exported from @uifabric/tsx-editor
for convenience).
Set up a .d.ts
rollup file for your package using API Extractor.
Add a dependency on raw-loader
to the package containing your demo app.
Define the custom list of supported packages. For demonstration purposes, we'll assume:
my-package
my-package
re-exports another package called my-package-utilities
(it's not required that your package export anything else, but this is included to demonstrate setting it up).d.ts
rollup lives under <package-folder>/dist/<unscoped-package-name>.d.ts
import { IPackageGroup } from '@uifabric/tsx-editor';
import { defaultSupportedPackages } from '@uifabric/tsx-editor/lib/utilities/defaultSupportedPackages';
export const editorSupportedPackages: IPackageGroup[] = [
...defaultSupportedPackages,
{
// Package's exports will be made available under this global name at runtime
globalName: 'MyPackage',
// Loader for the package's contents
loadGlobal: () => import('my-package'),
// Alternatively, for non-delayed loading:
// loadGlobal: () => require('my-package'),
// Or at the top of the file, `import * as MyPackage from 'my-package'`, then:
// loadGlobal: () => Promise.resolve(MyPackage)
packages: [
{
packageName: 'my-package',
loadTypes: () => {
// Use import() so the types can potentially be split into a separate chunk and delay loaded.
// If you don't care about that, you could use require() instead.
// @ts-ignore: import is handled by webpack
return import('!raw-loader!my-package/dist/my-package.d.ts');
},
},
{
// my-package re-exports my-package-utilities from its root, so it goes under the same global
packageName: 'my-package-utilities',
loadTypes: () => {
// @ts-ignore: import is handled by webpack
return import('!raw-loader!my-package-utilities/dist/my-package-utilities.d.ts');
},
},
],
},
];
ExampleCard
:import { editorSupportedPackages } from '<file path>';
import { MyExample } from './MyExample.Example';
const MyExampleCode = require('!raw-loader!./MyExample.Example.tsx');
<ExampleCard title="My example" code={MyExampleCode} editorSupportedPackages={editorSupportedPackages}>
<MyExample />
</ExampleCard>;
ExampleCard
instances in your app:import { editorSupportedPackages } from '<file path>';
import { IExampleCardProps, IAppDefinition } from '@uifabric/example-app-base';
const exampleCardProps: IExampleCardProps = { editorSupportedPackages };
// same applies with ISiteDefinition
const appDefinition: IAppDefinition = {
// ...
customizations: {
scopedSettings: {
ExampleCard: exampleCardProps,
},
},
};
FAQs
Fluent UI React components for building documentation sites.
The npm package @uifabric/example-app-base receives a total of 146 weekly downloads. As such, @uifabric/example-app-base popularity was classified as not popular.
We found that @uifabric/example-app-base demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.