Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init browser and nodejs template dirs #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .templates/browser/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.cache
dist
node_modules
13 changes: 13 additions & 0 deletions .templates/browser/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "template-browser",
"version": "0.1.0",
"description": "This is a template for Lit code examples executed within the browser",
"main": "src/index.html",
"license": "MIT",
"scripts": {
"start": "parcel ./src/index.html"
},
"devDependencies": {
"parcel-bundler": "^1.12.5"
}
}
12 changes: 12 additions & 0 deletions .templates/browser/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lit Browser Example</title>
</head>
<body>
<button id="myButton">Click Me</button>
<script src="./index.js"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions .templates/browser/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
document.addEventListener("DOMContentLoaded", () => {
document.getElementById("myButton").addEventListener("click", buttonClick);
});

async function buttonClick() {
console.log("Hello World!");
}
5,842 changes: 5,842 additions & 0 deletions .templates/browser/yarn.lock

Large diffs are not rendered by default.

Empty file added .templates/nodejs/.env.example
Empty file.
2 changes: 2 additions & 0 deletions .templates/nodejs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
node_modules
14 changes: 14 additions & 0 deletions .templates/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "template-nodejs",
"version": "0.1.0",
"description": "This is a template for Lit code examples executed via Node.js",
"main": "src/index.js",
"license": "MIT",
"type": "module",
"scripts": {
"start": "npx @dotenvx/dotenvx run -- node index.js"
},
"dependencies": {
"@dotenvx/dotenvx": "^0.37.1"
}
}
6 changes: 6 additions & 0 deletions .templates/nodejs/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* This project uses dotenvx, so any ENVs defined in a .env
* will automatically become available using process.ENV.YOUR_ENV
*/

console.log("Hello World!");
Loading