Skip to content

Commit

Permalink
Try to fix local dev
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarrough committed Oct 15, 2022
1 parent 10c0f26 commit 982e6e5
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 33 deletions.
22 changes: 0 additions & 22 deletions components/build-test.html

This file was deleted.

1 change: 1 addition & 0 deletions components/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<link rel="stylesheet" href="../styles/index.css" />
<script type="module" src="../src/r4-components.js"></script>
<script type="module" src="../index.js"></script>
</head>

<body>
Expand Down
5 changes: 3 additions & 2 deletions components/r4-favicon/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
<title>r4-favicon</title>
<meta name="description" content="r4-favicon">
<link rel="stylesheet" href="../../styles/r4-favicon.css" />
<script type="module">
<script type="module" src="../../index.js"></script>
<!-- <script type="module">
import R4Favicon from '../../src/components/r4-favicon.js'
customElements.define('r4-favicon', R4Favicon)
</script>
</script> -->
</head>

<body>
Expand Down
5 changes: 3 additions & 2 deletions components/r4-sign-in/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
<title>r4-sign-in</title>
<meta name="description" content="r4-sign-in">
<link rel="stylesheet" href="../../styles/r4-sign-in.css" />
<script type="module">
<script type="module" src="../../index.js"></script>
<!-- <script type="module">
import R4SignIn from '../../src/components/r4-sign-in.js'
customElements.define('r4-sign-in', R4SignIn)
</script>
</script> -->
</head>

<body>
Expand Down
5 changes: 3 additions & 2 deletions components/r4-sign-out/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
<title>r4-sign-out</title>
<meta name="description" content="r4-sign-out">
<link rel="stylesheet" href="../../styles/r4-sign-out.css" />
<script type="module">
<script type="module" src="../../index.js"></script>
<!-- <script type="module">
import R4SignOut from '../../src/components/r4-sign-out.js'
customElements.define('r4-sign-out', R4SignOut)
</script>
</script> -->
</head>

<body>
Expand Down
3 changes: 3 additions & 0 deletions components/r4-sign-up/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
<title>r4-sign-up</title>
<meta name="description" content="r4-title">
<link rel="stylesheet" href="../../styles/r4-sign-up.css" />
<script type="module" src="../../index.js"></script>
<!--
<script type="module">
import R4SignUp from '../../src/components/r4-sign-up.js'
customElements.define('r4-sign-up', R4SignUp)
</script>
-->
</head>

<body>
Expand Down
5 changes: 3 additions & 2 deletions components/r4-title/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
<title>r4-title</title>
<meta name="description" content="r4-title">
<link rel="stylesheet" href="../../styles/r4-title.css" />
<script type="module">
<script type="module" src="../../index.js"></script>
<!-- <script type="module">
import R4Title from '../../src/components/r4-title.js'
customElements.define('r4-title', R4Title)
</script>
</script> -->
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"private": false,
"scripts": {
"dev": "esbuild src/index.js --servedir= --outdir=dist/js --bundle",
"dev": "esbuild src/index.js --bundle --format=esm --servedir=. --outdir=.",
"build": "esbuild src/index.js --bundle --format=esm --minify --outfile=dist/index.esm.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ customElements.define('r4-sign-up', Component(R4SignUp, render))
customElements.define('r4-sign-in', Component(R4SignIn, render))
customElements.define('r4-sign-out', Component(R4SignOut, render))


export default {
R4Title,
R4Favicon,
Expand Down
4 changes: 3 additions & 1 deletion src/r4-components.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Components from './index.js'
// import Components from './index.js'
import Components from '../index.js'

const camelToDash = str => {
return str.replace(/([A-Z])/g, val => `-${val.toLowerCase()}`)
Expand All @@ -14,6 +15,7 @@ const slugFromName = componentName => {
class R4Components extends HTMLElement {
get components() {
return Object.keys(Components).map(componentName => {
console.log(componentName)
const Component = Components[componentName]
const config = {
name: componentName,
Expand Down

0 comments on commit 982e6e5

Please sign in to comment.