Skip to content

Commit

Permalink
fix(style-object): build errors (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsonsj authored Jul 19, 2023
1 parent b59a8f0 commit c790b55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"test": "nx run-many --all --target=test",
"build": "nx run-many --all --target=build",
"publish": "nx deploy dom && nx deploy html && nx deploy react",
"publish": "nx deploy dom && nx deploy html && nx deploy react && nx deploy utilities",
"prepare": "husky install"
},
"private": true,
Expand Down
8 changes: 4 additions & 4 deletions packages/utilities/src/lib/style-object.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import postcss = require('postcss')
import postcssJs = require('postcss-js')
import postcss from 'postcss'
import { parse as parser, objectify } from 'postcss-js'

export const transformStyleObjectToString = (style: { [key: string]: any }) => {
const postcssOptions = {
parser: postcssJs,
parser,
from: undefined,
}
return postcss()
Expand All @@ -14,5 +14,5 @@ export const transformStyleObjectToString = (style: { [key: string]: any }) => {

export const transformStyleStringToObject = (style: string) => {
const root = postcss.parse(style)
return postcssJs.objectify(root)
return objectify(root)
}

0 comments on commit c790b55

Please sign in to comment.