Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
e837c225
Unverified
Commit
e837c225
authored
Jul 27, 2020
by
Joe Haddad
Committed by
GitHub
Jul 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade cssnano-simple dependency (#15488)
parent
f98e38c9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
100 additions
and
24 deletions
+100
-24
package.json
packages/next/package.json
+1
-1
index.test.js
test/integration/css-customization/test/index.test.js
+5
-5
index.test.js
test/integration/css-features/test/index.test.js
+1
-1
_app.js
test/integration/css-fixtures/next-issue-15468/pages/_app.js
+12
-0
index.js
.../integration/css-fixtures/next-issue-15468/pages/index.js
+8
-0
global.css
...tegration/css-fixtures/next-issue-15468/styles/global.css
+16
-0
index.test.js
test/integration/css/test/index.test.js
+44
-4
index.test.js
test/integration/scss/test/index.test.js
+4
-4
yarn.lock
yarn.lock
+9
-9
No files found.
packages/next/package.json
View file @
e837c225
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
"cacache"
:
"13.0.1"
,
"cacache"
:
"13.0.1"
,
"chokidar"
:
"2.1.8"
,
"chokidar"
:
"2.1.8"
,
"css-loader"
:
"3.5.3"
,
"css-loader"
:
"3.5.3"
,
"cssnano-simple"
:
"1.0.
4
"
,
"cssnano-simple"
:
"1.0.
5
"
,
"find-cache-dir"
:
"3.3.1"
,
"find-cache-dir"
:
"3.3.1"
,
"jest-worker"
:
"24.9.0"
,
"jest-worker"
:
"24.9.0"
,
"loader-utils"
:
"2.0.0"
,
"loader-utils"
:
"2.0.0"
,
...
...
test/integration/css-customization/test/index.test.js
View file @
e837c225
...
@@ -33,7 +33,7 @@ describe('CSS Customization', () => {
...
@@ -33,7 +33,7 @@ describe('CSS Customization', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
`"@media (480px <= width < 768px){::placeholder{color:green}}.video{max-
height:300px;max-width:4
00px}"`
`"@media (480px <= width < 768px){::placeholder{color:green}}.video{max-
width:400px;max-height:3
00px}"`
)
)
// Contains a source map
// Contains a source map
...
@@ -54,7 +54,7 @@ describe('CSS Customization', () => {
...
@@ -54,7 +54,7 @@ describe('CSS Customization', () => {
const
{
version
,
mappings
,
sourcesContent
}
=
JSON
.
parse
(
cssMapContent
)
const
{
version
,
mappings
,
sourcesContent
}
=
JSON
.
parse
(
cssMapContent
)
expect
({
version
,
mappings
,
sourcesContent
}).
toMatchInlineSnapshot
(
`
expect
({
version
,
mappings
,
sourcesContent
}).
toMatchInlineSnapshot
(
`
Object {
Object {
"mappings": "AACA,gCACE,cACE,WACF,CACF,CAGA,OACE,
gBAA0B,CAA1B,e
ACF",
"mappings": "AACA,gCACE,cACE,WACF,CACF,CAGA,OACE,
eAA0B,CAA1B,gB
ACF",
"sourcesContent": Array [
"sourcesContent": Array [
"/* this should pass through untransformed */
"/* this should pass through untransformed */
@media (480px <= width < 768px) {
@media (480px <= width < 768px) {
...
@@ -132,7 +132,7 @@ describe('CSS Customization Array', () => {
...
@@ -132,7 +132,7 @@ describe('CSS Customization Array', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
`"@media (480px <= width < 768px){a:before{content:\\"\\"}::placeholder{color:green}}.video{max-
height:4800px;max-height:300rem;max-width:6400px;max-width:4
00rem}"`
`"@media (480px <= width < 768px){a:before{content:\\"\\"}::placeholder{color:green}}.video{max-
width:6400px;max-height:4800px;max-width:400rem;max-height:3
00rem}"`
)
)
// Contains a source map
// Contains a source map
...
@@ -153,7 +153,7 @@ describe('CSS Customization Array', () => {
...
@@ -153,7 +153,7 @@ describe('CSS Customization Array', () => {
const
{
version
,
mappings
,
sourcesContent
}
=
JSON
.
parse
(
cssMapContent
)
const
{
version
,
mappings
,
sourcesContent
}
=
JSON
.
parse
(
cssMapContent
)
expect
({
version
,
mappings
,
sourcesContent
}).
toMatchInlineSnapshot
(
`
expect
({
version
,
mappings
,
sourcesContent
}).
toMatchInlineSnapshot
(
`
Object {
Object {
"mappings": "AACA,gCACE,SACE,UACF,CACA,cACE,WACF,CACF,CAGA,OACE,
iBAA4B,CAA5B,iBAA4B,CAA5B,gBAA4B,CAA5B,g
BACF",
"mappings": "AACA,gCACE,SACE,UACF,CACA,cACE,WACF,CACF,CAGA,OACE,
gBAA4B,CAA5B,iBAA4B,CAA5B,gBAA4B,CAA5B,i
BACF",
"sourcesContent": Array [
"sourcesContent": Array [
"/* this should pass through untransformed */
"/* this should pass through untransformed */
@media (480px <= width < 768px) {
@media (480px <= width < 768px) {
...
@@ -213,7 +213,7 @@ describe('Bad CSS Customization', () => {
...
@@ -213,7 +213,7 @@ describe('Bad CSS Customization', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
`".video{max-
height:300px;max-width:4
00px}"`
`".video{max-
width:400px;max-height:3
00px}"`
)
)
// Contains a source map
// Contains a source map
...
...
test/integration/css-features/test/index.test.js
View file @
e837c225
...
@@ -35,7 +35,7 @@ describe('Browserslist: Old', () => {
...
@@ -35,7 +35,7 @@ describe('Browserslist: Old', () => {
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatchInlineSnapshot
(
`"a{
clip:auto;grid-column-gap:normal;all:initial;-webkit-animation:none 0s ease 0s 1 normal none running;animation:none 0s ease 0s 1 normal none running;-webkit-backface-visibility:visible;backface-visibility:visible;background:transparent none repeat 0 0/auto auto padding-box border-box scroll;border:none;border-collapse:separate;-webkit-border-image:none;border-image:none;-webkit-border-radius:0;border-radius:0;border-spacing:0;bottom:auto;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:content-box;box-sizing:content-box;caption-side:top;clear:none;color:#000;column-fill:balance;-webkit-columns:auto;-webkit-column-count:auto;-webkit-column-fill:balance;-webkit-column-gap:normal;column-gap:normal;-webkit-column-rule:medium none currentColor;column-rule:medium none currentColor;-webkit-column-span:1;column-span:1;-webkit-column-width:auto;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:serif;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-size:medium;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:400;height:auto;-ms-hyphens:none;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:disc none outside;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;-webkit-perspective:none;perspective:none;-webkit-perspective-origin:50% 50%;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;-webkit-transform:none;transform:none;-webkit-transform-origin:50% 50% 0;transform-origin:50% 50% 0;-webkit-transform-style:flat;transform-style:flat;-webkit-transition:none 0s ease 0s;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:2;width:auto;word-spacing:normal;z-index:auto
}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:2dppx){.image{background-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}}"`
`"a{
-webkit-animation:none 0s ease 0s 1 normal none running;animation:none 0s ease 0s 1 normal none running;-webkit-backface-visibility:visible;backface-visibility:visible;background:transparent none repeat 0 0/auto auto padding-box border-box scroll;border:none;border-collapse:separate;-webkit-border-image:none;border-image:none;-webkit-border-radius:0;border-radius:0;border-spacing:0;bottom:auto;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:content-box;box-sizing:content-box;caption-side:top;clear:none;clip:auto;color:#000;-webkit-columns:auto;-webkit-column-count:auto;-webkit-column-fill:balance;column-fill:balance;grid-column-gap:normal;-webkit-column-gap:normal;column-gap:normal;-webkit-column-rule:medium none currentColor;column-rule:medium none currentColor;-webkit-column-span:1;column-span:1;-webkit-column-width:auto;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:serif;font-size:medium;font-style:normal;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant:normal;font-weight:400;font-stretch:normal;line-height:normal;height:auto;-ms-hyphens:none;hyphens:none;left:auto;letter-spacing:normal;list-style:disc none outside;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;-webkit-perspective:none;perspective:none;-webkit-perspective-origin:50% 50%;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;-webkit-transform:none;transform:none;-webkit-transform-origin:50% 50% 0;transform-origin:50% 50% 0;-webkit-transform-style:flat;transform-style:flat;-webkit-transition:none 0s ease 0s;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:2;width:auto;word-spacing:normal;z-index:auto;all:initial
}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:2dppx){.image{background-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}}"`
)
)
})
})
})
})
...
...
test/integration/css-fixtures/next-issue-15468/pages/_app.js
0 → 100644
View file @
e837c225
import
App
from
'next/app'
import
React
from
'react'
import
'../styles/global.css'
class
MyApp
extends
App
{
render
()
{
const
{
Component
,
pageProps
}
=
this
.
props
return
<
Component
{...
pageProps
}
/
>
}
}
export
default
MyApp
test/integration/css-fixtures/next-issue-15468/pages/index.js
0 → 100644
View file @
e837c225
export
default
function
Home
()
{
return
(
<
main
>
<
div
className
=
"test1"
>
Hello
<
/div
>
<
div
className
=
"test2"
>
Hello
<
/div
>
<
/main
>
)
}
test/integration/css-fixtures/next-issue-15468/styles/global.css
0 → 100644
View file @
e837c225
:root
{
--blk
:
#000000
;
--five
:
5px
;
}
.test1
{
border
:
1px
solid
var
(
--blk
);
border-radius
:
var
(
--five
);
border-width
:
0
;
}
.test2
{
border
:
0px
solid
var
(
--blk
);
border-radius
:
var
(
--five
);
border-width
:
5px
;
}
test/integration/css/test/index.test.js
View file @
e837c225
...
@@ -132,7 +132,7 @@ describe('CSS Support', () => {
...
@@ -132,7 +132,7 @@ describe('CSS Support', () => {
expect
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()
).
toMatchInlineSnapshot
(
).
toMatchInlineSnapshot
(
`".red-text{color:purple;
color:red;font-weight:bolder}.blue-text{color:orange;color:#00f;font-weight:bolder
}"`
`".red-text{color:purple;
font-weight:bolder;color:red}.blue-text{color:orange;font-weight:bolder;color:#00f
}"`
)
)
})
})
})
})
...
@@ -564,7 +564,7 @@ describe('CSS Support', () => {
...
@@ -564,7 +564,7 @@ describe('CSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
background-image:url
\(\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
/^
\.
red-text
\{
color:red;background-image:url
\(\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
@@ -610,7 +610,7 @@ describe('CSS Support', () => {
...
@@ -610,7 +610,7 @@ describe('CSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
/^
\.
red-text
\{
color:red;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
@@ -656,7 +656,7 @@ describe('CSS Support', () => {
...
@@ -656,7 +656,7 @@ describe('CSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
/^
\.
red-text
\{
color:red;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
@@ -924,6 +924,46 @@ describe('CSS Support', () => {
...
@@ -924,6 +924,46 @@ describe('CSS Support', () => {
})
})
})
})
// https://github.com/vercel/next.js/issues/15468
describe
(
'CSS Property Ordering'
,
()
=>
{
const
appDir
=
join
(
fixturesDir
,
'next-issue-15468'
)
let
appPort
let
app
let
stdout
let
code
beforeAll
(
async
()
=>
{
await
remove
(
join
(
appDir
,
'.next'
))
;({
code
,
stdout
}
=
await
nextBuild
(
appDir
,
[],
{
stdout
:
true
,
}))
appPort
=
await
findPort
()
app
=
await
nextStart
(
appDir
,
appPort
)
})
afterAll
(
async
()
=>
{
await
killApp
(
app
)
})
it
(
'should have compiled successfully'
,
()
=>
{
expect
(
code
).
toBe
(
0
)
expect
(
stdout
).
toMatch
(
/Compiled successfully/
)
})
it
(
'should have the border width (property ordering)'
,
async
()
=>
{
const
browser
=
await
webdriver
(
appPort
,
'/'
)
const
width1
=
await
browser
.
eval
(
`window.getComputedStyle(document.querySelector('.test1')).borderWidth`
)
expect
(
width1
).
toMatchInlineSnapshot
(
`"0px"`
)
const
width2
=
await
browser
.
eval
(
`window.getComputedStyle(document.querySelector('.test2')).borderWidth`
)
expect
(
width2
).
toMatchInlineSnapshot
(
`"5px"`
)
})
})
describe
(
'Basic Tailwind CSS'
,
()
=>
{
describe
(
'Basic Tailwind CSS'
,
()
=>
{
const
appDir
=
join
(
fixturesDir
,
'with-tailwindcss'
)
const
appDir
=
join
(
fixturesDir
,
'with-tailwindcss'
)
...
...
test/integration/scss/test/index.test.js
View file @
e837c225
...
@@ -217,7 +217,7 @@ describe('SCSS Support', () => {
...
@@ -217,7 +217,7 @@ describe('SCSS Support', () => {
expect
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()
).
toMatchInlineSnapshot
(
).
toMatchInlineSnapshot
(
`".red-text{color:purple;
color:red;font-weight:bolder}.blue-text{color:orange;color:#00f;font-weight:bolder
}"`
`".red-text{color:purple;
font-weight:bolder;color:red}.blue-text{color:orange;font-weight:bolder;color:#00f
}"`
)
)
})
})
})
})
...
@@ -640,7 +640,7 @@ describe('SCSS Support', () => {
...
@@ -640,7 +640,7 @@ describe('SCSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
background-image:url
\(\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
/^
\.
red-text
\{
color:red;background-image:url
\(\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
@@ -686,7 +686,7 @@ describe('SCSS Support', () => {
...
@@ -686,7 +686,7 @@ describe('SCSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
/^
\.
red-text
\{
color:red;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
@@ -732,7 +732,7 @@ describe('SCSS Support', () => {
...
@@ -732,7 +732,7 @@ describe('SCSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
;color:red
\}\.
blue-text
\{
background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:orange;color:#00f;font-weight:bolder
\}
$/
/^
\.
red-text
\{
color:red;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(\/
foo
\/
_next
\/
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(\/
foo
\/
_next
\/
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
...
...
yarn.lock
View file @
e837c225
...
@@ -5561,19 +5561,19 @@ cssnano-preset-default@^4.0.7:
...
@@ -5561,19 +5561,19 @@ cssnano-preset-default@^4.0.7:
postcss-svgo "^4.0.2"
postcss-svgo "^4.0.2"
postcss-unique-selectors "^4.0.1"
postcss-unique-selectors "^4.0.1"
cssnano-preset-simple@
^1.1.3
:
cssnano-preset-simple@
1.1.4
:
version "1.1.
3
"
version "1.1.
4
"
resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-1.1.
3.tgz#c185f915afcfb803e78e357df48cc77f949eb1d4
"
resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-1.1.
4.tgz#7b287a31df786348565d02342df71af8f758ac82
"
integrity sha512-
7iDiM+OSkDlTrH/xGw748mr7FdQtFAy6qFRlTjJevAsG536DPOMeaDucJMqWzyAhcem0VQkTGveUk3bo3ux6h
A==
integrity sha512-
EYKDo65W+AxMViUijv/hvhbEnxUjmu3V7omcH1MatPOwjRLrAgVArUOE8wTUyc1ePFEtvV8oCT4/QSRJDorm/
A==
dependencies:
dependencies:
postcss "^7.0.32"
postcss "^7.0.32"
cssnano-simple@1.0.
4
:
cssnano-simple@1.0.
5
:
version "1.0.
4
"
version "1.0.
5
"
resolved "https://registry.yarnpkg.com/cssnano-simple/-/cssnano-simple-1.0.
4.tgz#2d56225795f4afbbb9c21df953cb43df6c589ae1
"
resolved "https://registry.yarnpkg.com/cssnano-simple/-/cssnano-simple-1.0.
5.tgz#66ee528f3a4e60754e2625ea9f51ac315f5f0a92
"
integrity sha512-
Em/QujEpiqfjT3wksbyHTYpBF2l7lfYuUiLjtCwurc6NqRFb4N/VZjC3djNuO7poFpO410tTcpJ38Qn8xWadcA
==
integrity sha512-
NJjx2Er1C3pa75v1GwMKm0w6xAp1GsW2Ql1As4CWPNFxTgYFN5e8wblYeHfna13sANAhyIdSIPqKJjBO4CU5Eg
==
dependencies:
dependencies:
cssnano-preset-simple "
^1.1.3
"
cssnano-preset-simple "
1.1.4
"
postcss "^7.0.32"
postcss "^7.0.32"
cssnano-util-get-arguments@^4.0.0:
cssnano-util-get-arguments@^4.0.0:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment