-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow referencing assets from the root of the project. (#707)
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
- Loading branch information
1 parent
7278b7a
commit ada378a
Showing
18 changed files
with
148 additions
and
42 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
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,15 @@ | ||
component Main { | ||
fun render : String { | ||
@asset(/fixtures/icon.svg) | ||
} | ||
} | ||
-------------------------------------------------------------------------------- | ||
---=== /__mint__/index.js ===--- | ||
export const A = () => { | ||
return `/__mint__/icon_c97b81630bc53286dadc8996727d348e.svg` | ||
}; | ||
|
||
---=== /__mint__/icon_c97b81630bc53286dadc8996727d348e.svg ===--- | ||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> | ||
<path d="M24 10h-10v-10h-4v10h-10v4h10v10h4v-10h10z"/> | ||
</svg> |
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,67 @@ | ||
component Main { | ||
fun render : Html { | ||
@highlight-file(/fixtures/Test.mint) | ||
} | ||
} | ||
-------------------------------------------------------------------------------- | ||
import { | ||
createElement as A, | ||
fragment as B | ||
} from "./runtime.js"; | ||
|
||
export const C = () => { | ||
return A(B, {}, [ | ||
A("span", { | ||
className: "line" | ||
}, [ | ||
A("span", { | ||
className: "keyword" | ||
}, [`component`]), | ||
` `, | ||
A("span", { | ||
className: "type" | ||
}, [`Main`]), | ||
` { | ||
` | ||
]), | ||
A("span", { | ||
className: "line" | ||
}, [ | ||
` `, | ||
A("span", { | ||
className: "keyword" | ||
}, [`fun`]), | ||
` render : `, | ||
A("span", { | ||
className: "type" | ||
}, [`Html`]), | ||
` { | ||
` | ||
]), | ||
A("span", { | ||
className: "line" | ||
}, [ | ||
` <`, | ||
A("span", { | ||
className: "namespace" | ||
}, [`div`]), | ||
`></`, | ||
A("span", { | ||
className: "namespace" | ||
}, [`div`]), | ||
`> | ||
` | ||
]), | ||
A("span", { | ||
className: "line" | ||
}, [` } | ||
`]), | ||
A("span", { | ||
className: "line" | ||
}, [`} | ||
`]), | ||
A("span", { | ||
className: "line" | ||
}, [``]) | ||
]) | ||
}; |
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,10 @@ | ||
component Main { | ||
fun render : String { | ||
@inline(/fixtures/data.txt) | ||
} | ||
} | ||
-------------------------------------------------------------------------------- | ||
export const A = () => { | ||
return `Hello World! | ||
` | ||
}; |
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,20 @@ | ||
component Main { | ||
fun render : Html { | ||
@svg(/fixtures/icon.svg) | ||
} | ||
} | ||
-------------------------------------------------------------------------------- | ||
import { createElement as A } from "./runtime.js"; | ||
|
||
export const | ||
a = A(`svg`, { | ||
dangerouslySetInnerHTML: { | ||
__html: `<path d="M24 10h-10v-10h-4v10h-10v4h10v10h4v-10h10z"/>` | ||
}, | ||
viewBox: `0 0 24 24`, | ||
height: `24`, | ||
width: `24` | ||
}), | ||
B = () => { | ||
return a | ||
}; |
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,3 @@ | ||
{ | ||
"name": "ROOT FOR TESTS" | ||
} |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
require "spec" | ||
|
||
ENV["SPEC"] = "TRUE" | ||
MINT_ENV["TEST"] = "TRUE" | ||
|
||
require "./spec_helpers" | ||
|
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
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
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