-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathstencil.config.ts
94 lines (93 loc) · 2.37 KB
/
stencil.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import { Config } from '@stencil/core';
import { sass } from '@stencil/sass';
import postcss from 'rollup-plugin-postcss';
import { reactOutputTarget } from '@stencil/react-output-target';
import { angularOutputTarget } from '@stencil/angular-output-target';
import { angularValueAccessorBindings } from './.config/bindings.angular';
export const config: Config = {
namespace: 'post-components',
buildDist: true,
sourceMap: false,
validatePrimaryPackageOutputTarget: true,
hydratedFlag: {
name: 'data-hydrated',
selector: 'attribute',
},
outputTargets: [
{
type: 'dist',
esmLoaderPath: '../loader',
isPrimaryPackageOutputTarget: true,
},
{
type: 'dist-custom-elements',
},
{
type: 'dist-custom-elements',
customElementsExportBehavior: 'single-export-module',
dir: 'loaders',
},
{
type: 'www',
copy: [
{
src: '../node_modules/@swisspost/design-system-styles/*.css',
dest: 'assets/css',
},
],
serviceWorker: null, // disable service workers,
},
{
type: 'docs-readme',
},
{
type: 'docs-json',
file: 'dist/docs.json',
},
reactOutputTarget({
componentCorePackage: '@swisspost/design-system-components',
proxiesFile: '../components-react/src/components/stencil-generated/index.ts',
includeDefineCustomElements: true,
}),
angularOutputTarget({
componentCorePackage: '@swisspost/design-system-components',
outputType: 'component',
directivesProxyFile:
'../components-angular/projects/components/src/lib/stencil-generated/components.ts',
directivesArrayFile:
'../components-angular/projects/components/src/lib/stencil-generated/index.ts',
valueAccessorConfigs: angularValueAccessorBindings,
}),
],
extras: {
enableImportInjection: true,
},
plugins: [
sass({
outputStyle: 'compressed',
includePaths: ['node_modules'],
}),
],
rollupPlugins: {
before: [
postcss({
use: {
sass: {
includePaths: ['node_modules'],
},
stylus: false,
less: false,
},
}),
],
},
testing: {
testPathIgnorePatterns: [
'<rootDir>/dist/',
'<rootDir>/loader/',
'<rootDir>/loaders/',
'<rootDir>/www/',
'<rootDir>/cypress',
],
},
};