Skip to content

Commit

Permalink
update stencil config
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Apr 9, 2024
1 parent cedeba5 commit d344149
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions packages/core/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { webOutputTarget } from '@baloise/output-target-web'
const IS_BAL_DS_RELEASE = process.env.BAL_DS_RELEASE === 'true'
const IS_BAL_DOCUMENTATION = process.env.BAL_DOCUMENTATION === 'true'
const IS_BAL_DEVELOPMENT = process.env.BAL_DEVELOPMENT === 'true'
const IS_BAL_TESTING = process.env.BAL_TESTING === 'true'

if (IS_BAL_DS_RELEASE) {
console.log('')
Expand All @@ -31,14 +32,20 @@ if (IS_BAL_DEVELOPMENT) {
console.log('')
}

if (IS_BAL_TESTING) {
console.log('')
console.log('🧪 Build is set to testing 🧪')
console.log('')
}

const workspaceDir = join(parse(__dirname).dir, '..')
const packagesDir = join(workspaceDir, 'packages')
const nodeModulesProject = join(__dirname, 'node_modules')
const nodeModulesWorkspace = join(workspaceDir, 'node_modules')

export const config: Config = {
autoprefixCss: true,
sourceMap: false,
sourceMap: IS_BAL_TESTING || IS_BAL_DEVELOPMENT,
namespace: 'baloise-design-system',
hashedFileNameLength: 10,
enableCache: true,
Expand Down Expand Up @@ -66,14 +73,17 @@ export const config: Config = {
...(!IS_BAL_DEVELOPMENT
? [
CustomDocumentationGenerator,
webOutputTarget({
dir: IS_BAL_TESTING ? '../../e2e/generated/components' : 'components',
isTest: IS_BAL_TESTING,
}),
{
type: 'dist-custom-elements',
dir: 'components',
dir: IS_BAL_TESTING ? '../../e2e/generated/components' : 'components',
empty: true,
includeGlobalScripts: false,
generateTypeDeclarations: true,
},
webOutputTarget({
proxiesFile: 'config/custom-elements/all.js',
}),
]
: []),
{
Expand Down Expand Up @@ -113,17 +123,12 @@ export const config: Config = {
dest: 'assets/fonts',
warn: true,
},
// {
// src: join(packagesDir, 'core', '.tmp', 'all.js'),
// dest: '../components/all.js',
// warn: true,
// },
],
},
/**
* Skip those outputs for documentation releases on vercel
*/
...(!IS_BAL_DOCUMENTATION
...(!IS_BAL_DOCUMENTATION && !IS_BAL_TESTING
? [
{
type: 'docs-vscode',
Expand Down

0 comments on commit d344149

Please sign in to comment.