File tree Expand file tree Collapse file tree 3 files changed +39
-3
lines changed
integrations/tailwindcss-cli/tests Expand file tree Collapse file tree 3 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
- - Nothing yet!
10
+ ### Fixed
11
+
12
+ - Fixed use of ` raw ` content in the CLI ([ #9773 ] ( https://github.com/tailwindlabs/tailwindcss/pull/9773 ) )
11
13
12
14
## [ 3.2.2] - 2022-11-04
13
15
Original file line number Diff line number Diff line change @@ -191,6 +191,40 @@ describe('static build', () => {
191
191
`
192
192
)
193
193
} )
194
+
195
+ it ( 'should work with raw content' , async ( ) => {
196
+ await writeInputFile (
197
+ '../tailwind.config.js' ,
198
+ javascript `
199
+ module .exports = {
200
+ content : {
201
+ files : [{ raw : 'bg-red-500' }],
202
+ },
203
+ theme : {
204
+ extend : {
205
+ },
206
+ },
207
+ corePlugins : {
208
+ preflight : false,
209
+ },
210
+ plugins: [ ],
211
+ }
212
+ `
213
+ )
214
+
215
+ await $ ( 'node ../../lib/cli.js -i ./src/index.css -o ./dist/main.css' , {
216
+ env : { NODE_ENV : 'production' } ,
217
+ } )
218
+
219
+ expect ( await readOutputFile ( 'main.css' ) ) . toIncludeCss (
220
+ css `
221
+ .bg-red-500 {
222
+ --tw-bg-opacity : 1 ;
223
+ background-color : rgb (239 68 68 / var (--tw-bg-opacity ));
224
+ }
225
+ `
226
+ )
227
+ } )
194
228
} )
195
229
196
230
describe ( 'watcher' , ( ) => {
Original file line number Diff line number Diff line change @@ -195,8 +195,8 @@ let state = {
195
195
return file !== null && typeof file === 'object'
196
196
} )
197
197
198
- for ( let { raw : content , extension = 'html' } of rawContent ) {
199
- content . push ( { content, extension } )
198
+ for ( let { raw : htmlContent , extension = 'html' } of rawContent ) {
199
+ content . push ( { content : htmlContent , extension } )
200
200
}
201
201
202
202
return content
You can’t perform that action at this time.
0 commit comments