Skip to content

Commit b322ac0

Browse files
clean up missed TODOs and console logs
1 parent 6180ea7 commit b322ac0

File tree

6 files changed

+1
-13
lines changed

6 files changed

+1
-13
lines changed

packages/cli/src/config/rollup.config.js

-3
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,6 @@ function greenwoodHtmlPlugin(compilation) {
162162
} else {
163163
const { src } = parsedAttributes;
164164

165-
// TODO avoid using href and set it to the value of rollup fileName instead
166-
// since user paths can still be the same file,
167-
// e.g. ../theme.css and ./theme.css are still the same file
168165
mappedScripts.set(src, true);
169166

170167
const srcPath = src.replace('../', './');

packages/cli/src/lib/router.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@ document.addEventListener('click', function(e) {
33
e.preventDefault();
44

55
if (e.path[0].href) {
6-
console.debug('linked clicked was...', e.path[0].href);
76
const target = e.path[0];
87
const route = target.href.replace(window.location.origin, '');
98
const routerOutlet = Array.from(document.getElementsByTagName('greenwood-route')).filter(outlet => {
109
return outlet.getAttribute('data-route') === route;
1110
})[0];
1211

13-
console.debug('routerOutlet', routerOutlet);
14-
1512
if (routerOutlet.getAttribute('data-template') === window.__greenwood.currentTemplate) {
1613
window.__greenwood.currentTemplate = routerOutlet.getAttribute('data-template');
1714
routerOutlet.loadRoute();
1815
} else {
19-
console.debug('new template detected, should do a hard reload');
2016
window.location.href = target;
2117
}
2218
}
@@ -26,8 +22,7 @@ class RouteComponent extends HTMLElement {
2622
loadRoute() {
2723
const route = this.getAttribute('data-route');
2824
const key = this.getAttribute('data-key');
29-
console.debug('load route ->', route);
30-
console.debug('with bundle ->', key);
25+
3126
fetch(key)
3227
.then(res => res.text())
3328
.then((response) => {

packages/cli/test/cases/build.config.optimization-default/src/pages/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<html lang="en" prefix="og:http://ogp.me/ns#">
33

44
<head>
5-
<!-- TODO have to use forward slash / for path references? translate on the fly in serve.js? -->
65
<script type="module" src="/components/header.js"></script>
76
<link rel="stylesheet" href="/styles/theme.css"></link>
87
</head>

packages/cli/test/cases/build.config.optimization-inline/src/pages/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<html lang="en" prefix="og:http://ogp.me/ns#">
33

44
<head>
5-
<!-- TODO have to use forward slash / for path references? translate on the fly in serve.js? -->
65
<script type="module" src="/components/header.js"></script>
76
<link rel="stylesheet" href="/styles/theme.css"></link>
87
</head>

packages/cli/test/cases/build.config.optimization-none/src/pages/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<html lang="en" prefix="og:http://ogp.me/ns#">
33

44
<head>
5-
<!-- TODO have to use forward slash / for path references? translate on the fly in serve.js? -->
65
<script type="module" src="/components/header.js"></script>
76
<link rel="stylesheet" href="/styles/theme.css"></link>
87
</head>

packages/cli/test/cases/build.config.optimization-static/src/pages/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<html lang="en" prefix="og:http://ogp.me/ns#">
33

44
<head>
5-
<!-- TODO have to use forward slash / for path references? translate on the fly in serve.js? -->
65
<script type="module" src="/components/header.js"></script>
76
</head>
87

0 commit comments

Comments
 (0)