mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
feat(shared,crm): add Code 128 barcode generation library Implements new @isa/shared/barcode library with directive and component for generating Code 128 barcodes using JsBarcode. Features: - Standalone Angular directive (svg[sharedBarcode]) - Standalone Angular component (<shared-barcode>) - Signal-based reactive inputs - SVG-based vector rendering - Customizable colors, size, margins, fonts - Comprehensive Vitest test coverage (39 tests) - Storybook stories for both directive and component - Integrated into customer loyalty card component Changes: - Created @isa/shared/barcode library with directive and component - Added JsBarcode dependency (v3.12.1) - Integrated barcode into customer loyalty card display - Added Storybook stories for interactive documentation - Fixed ui-switch story component reference - Updated library reference documentation Refs #5496 Related work items: #5496
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
/// <reference types='vitest' />
|
|
import { defineConfig } from 'vite';
|
|
import angular from '@analogjs/vite-plugin-angular';
|
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
|
|
export default
|
|
// @ts-expect-error - Vitest reporter tuple types have complex inference issues
|
|
defineConfig(() => ({
|
|
root: __dirname,
|
|
cacheDir: '../../../node_modules/.vite/libs/shared/barcode',
|
|
plugins: [angular(), nxViteTsPaths(), nxCopyAssetsPlugin(['*.md'])],
|
|
test: {
|
|
watch: false,
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
setupFiles: ['src/test-setup.ts'],
|
|
reporters: [
|
|
'default',
|
|
['junit', { outputFile: '../../../testresults/junit-shared-barcode.xml' }],
|
|
],
|
|
coverage: {
|
|
reportsDirectory: '../../../coverage/libs/shared/barcode',
|
|
provider: 'v8' as const,
|
|
reporter: ['text', 'cobertura'],
|
|
},
|
|
},
|
|
}));
|