Skip to content

Commit

Permalink
Add one more hello
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Nov 4, 2020
1 parent 0db16a7 commit b70f2cc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import { hello1, hello2 } from 'core/util';
// From mod2
import * as data from 'core/util/data.json';
// hello3 lives in mod2 which also have a index.js in util.
// hello3, hello6 lives in mod2 which also have a index.js in util.
// But doing import from 'core/util' you will get the index.js file from mod1
// (higher up in the import list), so we need to be explicit:
import { hello3 } from 'core/util/hello3';
import { hello3, hello6 } from 'core/util/hello3';

// From main
import { hello4 } from './lib';
Expand All @@ -16,5 +16,6 @@ window.hello1 = hello1;
window.hello2 = hello2;
window.hello3 = hello3;
window.hello4 = hello4;
window.hello6 = hello6;
window.data = data;
window.params = params;
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/bep/hugo-jslibs/alpinejs v0.5.14 // indirect
github.com/date-fns/date-fns v2.16.1+incompatible // indirect
github.com/gohugoio/hugoTestModulesJS/mod1 v0.2.0 // indirect
github.com/gohugoio/hugoTestModulesJS/mod2 v0.2.0 // indirect
github.com/gohugoio/hugoTestModulesJS/mod2 v0.3.0 // indirect
)


1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ github.com/gohugoio/hugoTestModulesJS/mod2 v0.0.0-20201011192008-decf54abafdd h1
github.com/gohugoio/hugoTestModulesJS/mod2 v0.0.0-20201011192008-decf54abafdd/go.mod h1:uynOkor8I03PIUuDZN4NYQ+Bmkye7vNLV5tRUBC2+10=
github.com/gohugoio/hugoTestModulesJS/mod2 v0.1.0/go.mod h1:uynOkor8I03PIUuDZN4NYQ+Bmkye7vNLV5tRUBC2+10=
github.com/gohugoio/hugoTestModulesJS/mod2 v0.2.0/go.mod h1:uynOkor8I03PIUuDZN4NYQ+Bmkye7vNLV5tRUBC2+10=
github.com/gohugoio/hugoTestModulesJS/mod2 v0.3.0/go.mod h1:uynOkor8I03PIUuDZN4NYQ+Bmkye7vNLV5tRUBC2+10=
1 change: 1 addition & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<li x-text="hello2()"></li>
<li x-text="hello3()"></li>
<li x-text="hello4()"></li>
<li x-text="hello6()"></li>
<li x-text="data.Hugo"></li>
<li x-text="params.myparam"></li>
</ul>
Expand Down

0 comments on commit b70f2cc

Please sign in to comment.