You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Don't track coverage by tests in watch mode
* Add the possibility to set plugin options for each test
* POC: Use plugin options to define attribute name instead of permanent className
* Improve test coverage
* Hide Flow error
* Make arguments in context key-based
* Add test case of computed class value
* Add information about new option to README
3. Now all your templates written with pug are understood by react and browsers.
159
160
161
+
### Configuration
162
+
163
+
| Name | Type | Default | Description
164
+
| - | - | - | -
165
+
| [`classAttribute`](#classattribute) | `String` | `className` | Attribute name which considered by PUG as "class"
166
+
167
+
#### `classAttribute`
168
+
169
+
Default:
170
+
171
+
```
172
+
pug`p.one`
173
+
174
+
=>
175
+
<pclassName="one" />
176
+
```
177
+
178
+
With "styleName" as value:
179
+
180
+
```
181
+
pug`p.one`
182
+
183
+
=>
184
+
<pstyleName="one" />
185
+
```
186
+
160
187
### create-react-app
161
188
162
189
Integrating with [create-react-app][link to cra] is tricky because it does not allow you to modify babel configuration. There are two documented possibilities:
exports[`static html output: static html 1`] =`"<divclass=\\"first-afirst-b\\"><pclass=\\"second-asecond-bsecond-csecond-d\\"></p><pstyleName=\\"third-ethird-f\\"class=\\"third-athird-bthird-cthird-dthird-gthird-h\\"></p><pstyleName=\\"fourth-afourth-b\\"></p><pclass=\\"fivth-afivth-b\\"></p><pstyleName=\\"two\\"class=\\"onejack\\"></p><pclass=\\"seventh-aseventh-bseventh-i-1seventh-g-1\\"></p><pclass=\\"seventh-aseventh-bseventh-i-2seventh-g-2\\"></p><pclass=\\"seventh-aseventh-bseventh-i-3seventh-g-3\\"></p></div>"`;
0 commit comments