From cdaf8a3ef05840acc8b25da9971157f11619c85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 22 Jan 2021 17:18:25 +0100 Subject: Use the production version of React when CDN --- layouts/index.html | 4 ++-- node_modules/mynodemod/index.js | 5 ----- node_modules/mynodemod/lib/index.js | 3 --- package.json | 4 ++-- 4 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 node_modules/mynodemod/index.js delete mode 100644 node_modules/mynodemod/lib/index.js diff --git a/layouts/index.html b/layouts/index.html index 2d6357b..e70dd7f 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -7,8 +7,8 @@ {{ if hugo.IsProduction }} {{/* We import from node_modules in development to get code completion etc. working. */}} - - + + {{ end }} {{ $inject := slice "js/shims/process.js" }} {{ $js := resources.Get "js/main.js" | js.Build (dict "minify" false "params" (dict "myparam" "Hugo Rocks!") "inject" $inject ) }} diff --git a/node_modules/mynodemod/index.js b/node_modules/mynodemod/index.js deleted file mode 100644 index 4d28a19..0000000 --- a/node_modules/mynodemod/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import { helloFromNodeModules } from './lib'; - -export function helloNodeModules() { - return `Hello from node_modules: ${helloFromNodeModules()}`; -} diff --git a/node_modules/mynodemod/lib/index.js b/node_modules/mynodemod/lib/index.js deleted file mode 100644 index f93a760..0000000 --- a/node_modules/mynodemod/lib/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export function helloFromNodeModules() { - return 'Hello from lib in node_modules'; -} diff --git a/package.json b/package.json index 362b9fd..ff78c75 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "url": "git+https://github.com/gohugoio/hugoTestProjectJSModImports.git" }, "scripts": { - "test": "echo \"Error: no test specified\" \u0026\u0026 exit 1" + "test": "echo \"Error: no test specified\" && exit 1" }, "version": "1.0.0" -} \ No newline at end of file +} -- cgit v1.2.3