boxwood 0.61.0 → 0.61.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +7 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -107,13 +107,19 @@ const BOOLEAN_ATTRIBUTES = [
107
107
  'translate',
108
108
  ]
109
109
 
110
+ const ALIASES = {
111
+ className: 'class',
112
+ htmlFor: 'for'
113
+ }
114
+
110
115
  const attributes = (options) => {
111
116
  const result = []
112
117
  for (const key in options) {
113
118
  if (BOOLEAN_ATTRIBUTES.includes(key)) {
114
119
  result.push(key)
115
120
  } else {
116
- result.push(key + '=' + '"' + options[key] + '"')
121
+ const name = ALIASES[key] || key
122
+ result.push(name + '=' + '"' + options[key] + '"')
117
123
  }
118
124
  }
119
125
  return result.join(' ')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "boxwood",
3
- "version": "0.61.0",
3
+ "version": "0.61.1",
4
4
  "description": "Compile HTML templates into JS",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -63,7 +63,7 @@
63
63
  ]
64
64
  },
65
65
  "dependencies": {
66
- "css-tree": "^2.3.0",
66
+ "css-tree": "^2.3.1",
67
67
  "string-hash": "^1.1.3"
68
68
  }
69
69
  }