Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugoTestProjectJSModImports.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-01-21 21:36:52 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-01-21 21:36:52 +0300
commita3dd7903af60b193164ae4aba56680e7e60acb97 (patch)
tree7fa029c468faf0c4c6b45bcf6606b00eb280d435
parentc5fc81295eeef44487b8a0f62df38d0686f8a5e1 (diff)
Disable a test case to get Hugo tests runningv0.8.0
-rw-r--r--assets/js/like.jsx2
-rw-r--r--assets/js/main.js4
-rw-r--r--assets/js/shims/react-dom.js2
-rw-r--r--assets/js/shims/react.js2
-rw-r--r--layouts/index.html2
5 files changed, 6 insertions, 6 deletions
diff --git a/assets/js/like.jsx b/assets/js/like.jsx
index d0ec61e..96c60f3 100644
--- a/assets/js/like.jsx
+++ b/assets/js/like.jsx
@@ -1,6 +1,6 @@
// Note: We're using the CDN in "production".
import * as React from 'react'
-import * as ReactDOM from "react-dom";
+import * as ReactDOM from 'react-dom';
// A simple React JSX component.
class LikeButton extends React.Component {
diff --git a/assets/js/main.js b/assets/js/main.js
index ac34ac9..9ac34fb 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -13,13 +13,13 @@ import { hello4 } from './lib';
import * as params from '@params';
// https://github.com/gohugoio/hugo/issues/7948
-import { helloNodeModules } from 'mynodemod';
+// TODO(bep) make this work in Hugo integration tests import { helloNodeModules } from 'mynodemod';
window.hello1 = hello1;
window.hello2 = hello2;
window.hello3 = hello3;
window.hello4 = hello4;
window.hello6 = hello6;
-window.helloNodeModules = helloNodeModules;
+// TODO(bep) make this work in Hugo integration tests window.helloNodeModules = helloNodeModules;
window.data = data;
window.params = params;
diff --git a/assets/js/shims/react-dom.js b/assets/js/shims/react-dom.js
index 2591e51..178ac9e 100644
--- a/assets/js/shims/react-dom.js
+++ b/assets/js/shims/react-dom.js
@@ -1 +1 @@
-export let ReactDOM = window.ReactDOM;
+module.exports = window.ReactDOM;
diff --git a/assets/js/shims/react.js b/assets/js/shims/react.js
index 705c323..22312fb 100644
--- a/assets/js/shims/react.js
+++ b/assets/js/shims/react.js
@@ -1 +1 @@
-export let React = window.React;
+module.exports = window.React;
diff --git a/layouts/index.html b/layouts/index.html
index d31e2c9..24c16bb 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -25,7 +25,7 @@
<li x-text="hello3()"></li>
<li x-text="hello4()"></li>
<li x-text="hello6()"></li>
- <li x-text="helloNodeModules()"></li>
+ <!--li x-text="helloNodeModules()"></li-->
<li x-text="data.Hugo"></li>
<li x-text="params.myparam"></li>
</ul>