Skip to content

Commit

Permalink
fix: remove postinstall (#19)
Browse files Browse the repository at this point in the history
- Couldn't find a script named "babel".
- Some type improvements
  • Loading branch information
tujoworker authored Oct 11, 2023
1 parent 5103d8a commit 3c965e5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- name: Install deps
run: yarn install --immutable

- name: Build package
run: yarn workspace gatsby-plugin-eufemia-theme-handler build

- name: Set git config
run: |
git config --global user.name 'Tobias Høegh'
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"build": "yarn workspace gatsby-plugin-eufemia-theme-handler build && yarn workspace ui-theme-example build && yarn workspace ui-theme-example serve & yarn workspace sb-theme-example build",
"serve": "yarn workspace sb-theme-example serve & yarn workspace ui-theme-example serve",
"clean": "yarn workspace sb-theme-example clean & yarn workspace ui-theme-example clean",
"release": "yarn workspace gatsby-plugin-eufemia-theme-handler release",
"postinstall": "yarn workspace gatsby-plugin-eufemia-theme-handler build"
"release": "yarn workspace gatsby-plugin-eufemia-theme-handler release"
},
"devDependencies": {
"@dnb/eufemia": "10.7.0"
Expand Down
3 changes: 1 addition & 2 deletions packages/gatsby-plugin-eufemia-theme-handler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
"build:types": "tsc --project tsconfig.json",
"clean": "rm !(src|babel.config.js|.gitignore|LICENSE|.env|*.md|*.json)",
"watch": "yarn build --watch",
"test:types": "tsc --noEmit",
"postinstall": "yarn build"
"test:types": "tsc --noEmit"
},
"dependencies": {
"gatsby-core-utils": "4.12.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export type ThemesItem = {
file?: string
hide?: boolean
isDev?: boolean
} & ThemeProps & { name?: ThemeNames }
} & ThemeProps
export type Themes = Array<ThemesItem>

const defaultTheme = globalThis.EUFEMIA_THEME_defaultTheme || 'ui'
const availableThemes = globalThis.EUFEMIA_THEME_themes || []
const availableThemes = (globalThis.EUFEMIA_THEME_themes || []) as Themes
const storageId = globalThis.EUFEMIA_THEME_storageId || 'eufemia-theme'
const availableThemesArray = Object.keys(availableThemes)

Expand Down Expand Up @@ -74,7 +74,7 @@ export function getTheme(): ThemesItem {

export function setTheme(
themeProps: { name?: string; propMapping?: PropMapping },
callback?
callback?: (theme: ThemesItem) => void
) {
const theme = { ...getTheme(), ...themeProps } as ThemesItem

Expand Down

0 comments on commit 3c965e5

Please sign in to comment.