-
Notifications
You must be signed in to change notification settings - Fork 916
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd3027f
commit 5b7ce4d
Showing
9 changed files
with
222 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`snowpack build css-modules: allFiles 1`] = ` | ||
Array [ | ||
"__snowpack__/env.js", | ||
"src/App.js", | ||
"src/App.module.css", | ||
"src/App.module.css.proxy.js", | ||
] | ||
`; | ||
|
||
exports[`snowpack build css-modules: build/__snowpack__/env.js 1`] = `"export default {\\"MODE\\":\\"production\\",\\"NODE_ENV\\":\\"production\\",\\"SSR\\":false};"`; | ||
|
||
exports[`snowpack build css-modules: build/src/App.js 1`] = ` | ||
"import foo from \\"./App.module.css.proxy.js\\"; | ||
console.log(foo);" | ||
`; | ||
|
||
exports[`snowpack build css-modules: build/src/App.module.css 1`] = ` | ||
".App { | ||
text-align: center; | ||
} | ||
.App code { | ||
background: #FFF3; | ||
padding: 4px 8px; | ||
border-radius: 4px; | ||
} | ||
.App p { | ||
margin: 0.4rem; | ||
} | ||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
} | ||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
} | ||
.App-link { | ||
color: #61dafb; | ||
} | ||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
}" | ||
`; | ||
|
||
exports[`snowpack build css-modules: build/src/App.module.css.proxy.js 1`] = ` | ||
" | ||
export let code = \\"._App_10m0p_1 { text-align: center;}._App_10m0p_1 code { background: #FFF3; padding: 4px 8px; border-radius: 4px;}._App_10m0p_1 p { margin: 0.4rem;}._App-logo_10m0p_12 { height: 40vmin; pointer-events: none;}@media (prefers-reduced-motion: no-preference) { ._App-logo_10m0p_12 { animation: _App-logo-spin_10m0p_1 infinite 20s linear; }}._App-header_10m0p_23 { background-color: #282c34; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin); color: white;}._App-link_10m0p_34 { color: #61dafb;}@keyframes _App-logo-spin_10m0p_1 { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}\\"; | ||
let json = {\\"App\\":\\"_App_10m0p_1\\",\\"App-logo\\":\\"_App-logo_10m0p_12\\",\\"App-logo-spin\\":\\"_App-logo-spin_10m0p_1\\",\\"App-header\\":\\"_App-header_10m0p_23\\",\\"App-link\\":\\"_App-link_10m0p_34\\"}; | ||
export default json; | ||
// [snowpack] add styles to the page (skip if no document exists) | ||
if (typeof document !== 'undefined') { | ||
const styleEl = document.createElement(\\"style\\"); | ||
const codeEl = document.createTextNode(code); | ||
styleEl.type = 'text/css'; | ||
styleEl.appendChild(codeEl); | ||
document.head.appendChild(styleEl); | ||
}" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"private": true, | ||
"version": "1.0.1", | ||
"name": "@snowpack/test-css-modules", | ||
"description": "Tests CSS Module support", | ||
"scripts": { | ||
"testbuild": "snowpack build" | ||
}, | ||
"snowpack": { | ||
"mount": { | ||
"./src": "/src" | ||
} | ||
}, | ||
"dependencies": { | ||
"water.css": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@snowpack/plugin-optimize": "^0.2.6", | ||
"@snowpack/plugin-sass": "^1.1.1", | ||
"snowpack": "^2.14.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import foo from './App.module.css'; | ||
console.log(foo); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
.App code { | ||
background: #FFF3; | ||
padding: 4px 8px; | ||
border-radius: 4px; | ||
} | ||
.App p { | ||
margin: 0.4rem; | ||
} | ||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
} | ||
|
||
.App-link { | ||
color: #61dafb; | ||
} | ||
|
||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.