Skip to content

Commit

Permalink
Showing 5 changed files with 13 additions and 23 deletions.
22 changes: 6 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config-root",
"version": "3.1.0-alpha.2",
"version": "3.1.0-alpha.3",
"private": true,
"type": "commonjs",
"workspaces": [
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config-demo",
"version": "3.1.0-alpha.2",
"version": "3.1.0-alpha.3",
"private": true,
"type": "module",
"scripts": {
4 changes: 2 additions & 2 deletions packages/webpack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config",
"version": "3.1.0-alpha.2",
"version": "3.1.0-alpha.3",
"description": "A basic webpack config",
"type": "module",
"main": "src/index.js",
@@ -70,9 +70,9 @@
"glob": "^7.2.0",
"html-webpack-plugin": "^5.5.0",
"js-yaml-loader": "^1.2.2",
"kebab-case": "^1.0.1",
"lodash.merge": "^4.6.2",
"mini-css-extract-plugin": "^2.4.5",
"param-case": "^3.0.4",
"postcss": "^8.3.11",
"postcss-loader": "^6.2.0",
"postcss-preset-env": "^6.7.0",
6 changes: 3 additions & 3 deletions packages/webpack-config/src/utils/Html.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
* @copyright Studio Meta
* @license https://github.com/studiometa/twig-toolkit/blob/master/LICENSE
*/
import toKebab from 'kebab-case';
import { paramCase } from 'param-case';

/**
* @typdef {string | Record<string, boolean> | Record<number, Classes>} Classes
@@ -78,7 +78,7 @@ export default class Html {
if (key === '_keys' || (typeof value === 'boolean' && !value) || value === '') {
continue;
}
renderedStyles.push(`${toKebab(key)}: ${value};`);
renderedStyles.push(`${paramCase(key)}: ${value};`);
}
return renderedStyles.join(' ');
}
@@ -101,7 +101,7 @@ export default class Html {
continue;
}

key = toKebab(key);
key = paramCase(key);
if (typeof value === 'boolean') {
if (value) {
renderedAttributes.push(key);

0 comments on commit 48227b5

Please sign in to comment.