@storybook/angular
Version:
Storybook for Angular: Develop, document, and test UI components in isolation
46 lines (42 loc) • 1.76 kB
JavaScript
import CJS_COMPAT_NODE_URL_y9o7y3dohxd from 'node:url';
import CJS_COMPAT_NODE_PATH_y9o7y3dohxd from 'node:path';
import CJS_COMPAT_NODE_MODULE_y9o7y3dohxd from "node:module";
var __filename = CJS_COMPAT_NODE_URL_y9o7y3dohxd.fileURLToPath(import.meta.url);
var __dirname = CJS_COMPAT_NODE_PATH_y9o7y3dohxd.dirname(__filename);
var require = CJS_COMPAT_NODE_MODULE_y9o7y3dohxd.createRequire(import.meta.url);
// ------------------------------------------------------------
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
// ------------------------------------------------------------
// src/preset.ts
import { fileURLToPath } from "node:url";
var addons = [
fileURLToPath(import.meta.resolve("@storybook/angular/server/framework-preset-angular-cli")),
fileURLToPath(import.meta.resolve("@storybook/angular/server/framework-preset-angular-ivy"))
], previewAnnotations = async (entries = [], options) => {
let config = fileURLToPath(import.meta.resolve("@storybook/angular/client/config")), annotations = [...entries, config];
if (options.enableProdMode) {
let previewProdPath = fileURLToPath(
import.meta.resolve("@storybook/angular/client/preview-prod")
);
annotations.unshift(previewProdPath);
}
let docsConfig = await options.presets.apply("docs", {}, options);
if (Object.keys(docsConfig).length > 0) {
let docsConfigPath = fileURLToPath(
import.meta.resolve("@storybook/angular/client/docs/config")
);
annotations.push(docsConfigPath);
}
return annotations;
}, core = {
builder: import.meta.resolve("@storybook/builder-webpack5")
}, typescript = async (config) => ({
...config,
skipCompiler: !0
});
export {
addons,
core,
previewAnnotations,
typescript
};