-
Notifications
You must be signed in to change notification settings - Fork 12
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
Showing
6 changed files
with
59 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Asset Folder 1`] = ` | ||
"bundled-assets | ||
index.js" | ||
`; | ||
|
||
exports[`Asset Folder 2`] = ` | ||
"bXipeBrs.png | ||
bsdudxaF.md | ||
gToHHcDx.css | ||
gToHHcDx.css.map" | ||
`; | ||
|
||
exports[`Asset Folder 3`] = ` | ||
"import content from './bundled-assets/bsdudxaF.md'; | ||
import css from './bundled-assets/gToHHcDx.css'; | ||
function index() { | ||
return content + css | ||
} | ||
export default index; | ||
" | ||
`; | ||
|
||
exports[`Asset Folder 4`] = ` | ||
"body { | ||
font-size: 20px; | ||
background: url(./bXipeBrs.png) top left repeat; | ||
} | ||
/*# sourceMappingURL=gToHHcDx.css.map */" | ||
`; |
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 @@ | ||
# Hello |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,4 @@ | ||
body { | ||
font-size: 20px; | ||
background: url(./image.png) top left repeat; | ||
} |
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,6 @@ | ||
import content from "./content.md" | ||
import css from "./index.css" | ||
|
||
export default function() { | ||
return content + css | ||
} |
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,14 @@ | ||
import { bundle, clean, list, read } from "../util" | ||
|
||
const root = __dirname | ||
|
||
test("Asset Folder", async () => { | ||
await bundle(root, "index.js", "output/index.js", { folder: "bundled-assets" }) | ||
|
||
expect(await list(root, "output")).toMatchSnapshot() | ||
expect(await list(root, "output/bundled-assets")).toMatchSnapshot() | ||
expect(await read(root, "output/index.js")).toMatchSnapshot() | ||
expect(await read(root, "output/bundled-assets/gToHHcDx.css")).toMatchSnapshot() | ||
|
||
await clean(root, "output") | ||
}) |