bridgetown-plugin-nano 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f665f24f3f5c184da19e2e32971eab372fb02cba9e35e7a1d3a8834eb3bbca47
|
4
|
+
data.tar.gz: de969199ab18171eb454a0f6a4423d9fcd3fba9f9782c4c85fbe82651496cbcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6de7d87350c001e2e3d246966fb4e2b313fa32bf1374a530d9a132dbc64efad00a6ade93eb972be50d10d7a671285ec64dc4236f5f68f0b37e894ef9cb3f8f46
|
7
|
+
data.tar.gz: 792b1e1893a07b8c7225c0ce9fabe90f7238de2ef6558a80e87d3928a80a21b0db710c159f900ae9aadf421f3c228f484ecb2451d55a4dc48b2a88c86742f418
|
data/CHANGELOG.md
CHANGED
@@ -17,10 +17,23 @@ module BridgetownPluginNano
|
|
17
17
|
|
18
18
|
inject_into_file "webpack.config.js", <<-JS, after: "\n plugins: [\n"
|
19
19
|
new webpack.DefinePlugin({
|
20
|
-
NANO_API_URL: JSON.stringify(process.env.NANO_API_URL || "")
|
20
|
+
NANO_API_URL: JSON.stringify(process.env.NANO_API_URL || "/backend")
|
21
21
|
}),
|
22
22
|
JS
|
23
23
|
|
24
|
+
append_to_file "frontend/javascript/index.js" do
|
25
|
+
<<~JS
|
26
|
+
|
27
|
+
async function testNanoAPI() {
|
28
|
+
const resp = await fetch(`${NANO_API_URL}/nano`)
|
29
|
+
const data = await resp.json()
|
30
|
+
document.querySelector("main").innerHTML += `<p><code>${JSON.stringify(data)}</code></p>`
|
31
|
+
}
|
32
|
+
|
33
|
+
testNanoAPI()
|
34
|
+
JS
|
35
|
+
end
|
36
|
+
|
24
37
|
append_to_file "Gemfile" do
|
25
38
|
<<~RUBY
|
26
39
|
|