Skip to content

Commit

Permalink
chore: update build
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Aug 14, 2023
1 parent 38a2a22 commit 2f1def6
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 28 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"==================== BUILD ====================": "================================",
"build": "turbo run build && npm run build:post",
"build:force": "turbo run build --force && npm run build:post",
"build:post": "node .build/docs-copy.js && node .build/version.js && node .build/create-tags-list.js",
"build:post": "node .build/version.js && node .build/create-tags-list.js",
"build:serve": "turbo run build --filter=@baloise/design-system-tokens --filter=@baloise/design-system-fonts --filter=@baloise/design-system-icons --filter=@baloise/design-system-css",
"release": "npm run build:force && changeset publish",
"==================== TEST =====================": "================================",
Expand All @@ -55,7 +55,9 @@
"==================== RELEASE ==================": "================================",
"changeset": "changeset",
"==================== DOCUMENTATION ============": "================================",
"docs": "npm run build && npm --prefix packages/components run docs",
"docs:old": "npm run build && npm --prefix packages/components run docs",
"docs": "turbo run docs && npm run docs:post",
"docs:post": "node .build/docs-copy.js && node .build/version.js && node .build/create-tags-list.js",
"docs:serve": "http-server storybook -p 8080",
"storybook": "npm run docs",
"==================== INSTALLATION / SETUP =====": "================================",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/config/stencil.basic.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export const StencilBaseConfig: Config = {
includeGlobalScripts: false,
generateTypeDeclarations: false,
},
VueGenerator('../../..', './.storybook/vue/generated/components.ts', []),
VueGenerator('../', '../../test/generated/components/index.ts', []),
// VueGenerator('../../..', './.storybook/vue/generated/components.ts', []),
// VueGenerator('../', '../../test/generated/components/index.ts', []),
],
bundles: [
{ components: ['bal-accordion', 'bal-accordion-summary', 'bal-accordion-trigger', 'bal-accordion-details'] },
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"dev:build": "stencil build --config stencil.config.dev.ts --watch",
"dev:server": "start-storybook -p 6006 --quiet",
"==================== BUILD =========================": "================================",
"build": "stencil build --es5 --docs-json dist/docs.json && npm run build:post",
"build": "stencil build --es5 && npm run build:post",
"build:post": "node ../../.build/interfaces.js && node ../../.build/globals.js",
"==================== UNIT TEST =====================": "================================",
"test": "vitest run",
Expand Down
2 changes: 2 additions & 0 deletions packages/components/stencil.config.docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { Config } from '@stencil/core'

import { CustomDocumentationGenerator } from './config/doc-output-target'
import { StencilBaseConfig } from './config/stencil.basic.config'
import { VueGenerator } from './config/stencil.bindings.vue'

export const config: Config = {
...StencilBaseConfig,
outputTargets: [
...(StencilBaseConfig.outputTargets as any),
VueGenerator('../../..', './.storybook/vue/generated/components.ts', []),
/**
* Library outputs
*/
Expand Down
2 changes: 2 additions & 0 deletions packages/components/stencil.config.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { Config } from '@stencil/core'

import { StencilBaseConfig } from './config/stencil.basic.config'
import { VueGenerator } from './config/stencil.bindings.vue'

export const config: Config = {
...StencilBaseConfig,
tsconfig: 'tsconfig.docs.json',
outputTargets: [
...(StencilBaseConfig.outputTargets as any),
VueGenerator('../', '../../test/generated/components/index.ts', []),
// {
// type: 'www',
// dir: 'www',
Expand Down
45 changes: 22 additions & 23 deletions packages/components/stencil.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Config } from '@stencil/core'

import { CustomDocumentationGenerator } from './config/doc-output-target'
import { StencilBaseConfig } from './config/stencil.basic.config'
import { AngularGenerator } from './config/stencil.bindings.angular'
import { VueGenerator } from './config/stencil.bindings.vue'
Expand All @@ -16,36 +15,36 @@ export const config: Config = {
/**
* Library outputs
*/
{
type: 'docs-json',
file: './public/assets/data/components.json',
},
// {
// type: 'docs-json',
// file: './public/assets/data/components.json',
// },
VueGenerator(),
AngularGenerator(),
ReactGenerator(),
/**
* Documentation outputs
*/
CustomDocumentationGenerator,
// CustomDocumentationGenerator,
/**
* Copy assets for E2E testing
*/
{
type: 'www',
dir: 'www',
serviceWorker: false,
empty: true,
copy: [
{
src: '**/*.html',
},
{
src: 'components.d.ts',
},
{ src: '../../css/css/baloise-design-system.css', dest: 'assets/baloise-design-system.css', warn: true },
{ src: '../../fonts/lib', dest: 'assets/fonts', warn: true },
{ src: '../public/assets/images', dest: 'assets/images', warn: true },
],
},
// {
// type: 'www',
// dir: 'www',
// serviceWorker: false,
// empty: true,
// copy: [
// {
// src: '**/*.html',
// },
// {
// src: 'components.d.ts',
// },
// { src: '../../css/css/baloise-design-system.css', dest: 'assets/baloise-design-system.css', warn: true },
// { src: '../../fonts/lib', dest: 'assets/fonts', warn: true },
// { src: '../public/assets/images', dest: 'assets/images', warn: true },
// ],
// },
],
}
16 changes: 16 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@
"**/assets/fonts/**"
]
},
"docs": {
"dependsOn": ["^docs"],
"outputs": [
"dist/**",
"loader/**",
"wwww/**",
".tmp/**",
"css/baloise-design-system.css",
"css/design-system-table.css",
"**/components/**/readme.md",
"**/generated/**",
"**/assets/data/**",
"**/assets/download/**",
"**/assets/fonts/**"
]
},
"registry": {
"dependsOn": ["^registry"],
"inputs": ["package.json", "package-lock.json"]
Expand Down

0 comments on commit 2f1def6

Please sign in to comment.