Compare commits
2 Commits
starter/no
...
0328563e1d
| Author | SHA1 | Date | |
|---|---|---|---|
| 0328563e1d | |||
| d9781431c6 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
|
||||
87
README.md
87
README.md
@@ -1,87 +0,0 @@
|
||||
# Project Template
|
||||
|
||||
This repository is a starter template.
|
||||
Replace this README with documentation specific to your project once you begin development.
|
||||
|
||||
The notes below apply only if you choose to build a Node.js project using this template.
|
||||
|
||||
---
|
||||
|
||||
## If your project will use Node.js
|
||||
|
||||
Use Node 22 or newer for development.
|
||||
|
||||
Check your version:
|
||||
|
||||
```
|
||||
node --version
|
||||
```
|
||||
|
||||
If your version is older than 22, update using nvm:
|
||||
|
||||
```
|
||||
nvm install --lts
|
||||
```
|
||||
|
||||
(Optional) Make the new version your default:
|
||||
|
||||
```
|
||||
nvm alias default <version>
|
||||
```
|
||||
|
||||
After running `yarn init`, you may add a minimum Node version requirement to your `package.json`:
|
||||
|
||||
```json
|
||||
"engines": {
|
||||
"node": ">=22"
|
||||
}
|
||||
```
|
||||
|
||||
This helps ensure you do not accidentally use an outdated Node version.
|
||||
|
||||
---
|
||||
|
||||
## If your project will use Yarn (Berry)
|
||||
|
||||
This template assumes modern Yarn (Yarn 4+), managed by Corepack.
|
||||
|
||||
Enable Corepack:
|
||||
|
||||
```
|
||||
corepack enable
|
||||
```
|
||||
|
||||
Update Yarn to the latest stable version:
|
||||
|
||||
```
|
||||
corepack prepare yarn@stable --activate
|
||||
```
|
||||
|
||||
Install dependencies:
|
||||
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
|
||||
If you want Yarn to error (instead of warn) when the Node version does not satisfy the `engines` field, add this to `.yarnrc.yml`:
|
||||
|
||||
```yaml
|
||||
enableStrictEngineChecks: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## If your project will use containers
|
||||
|
||||
If you plan to build or deploy using Docker, choose a base image that matches your development environment.
|
||||
For Node.js projects, a common choice is:
|
||||
|
||||
```
|
||||
FROM node:24
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Replace this README
|
||||
|
||||
Once you know what your project will be (Node, C++, Python, etc.), replace this file with documentation specific to your build, run, and deployment steps.
|
||||
|
||||
39
base.css
Normal file
39
base.css
Normal file
@@ -0,0 +1,39 @@
|
||||
body {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.box {
|
||||
border: 4px solid #28e;
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.vertical-stack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.vertical-stack > * {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.vertical-stack > *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
border: 0.5px solid #558;
|
||||
background: hsl(228, 100%, 90%);
|
||||
background: linear-gradient(150deg, hsl(228, 100%, 95%) 0%, hsl(228, 100%, 80%) 100%);
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
font-size: small;
|
||||
font-family: "Dosis", sans-serif;
|
||||
font-optical-sizing: auto;
|
||||
font-weight: 600;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
29
index.html
Normal file
29
index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>My Demo</title>
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta charset="utf-8">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Dosis:wght@200..800&display=swap" rel="stylesheet">
|
||||
<link type="text/css" rel="stylesheet" href="reset.css" />
|
||||
<link type="text/css" rel="stylesheet" href="base.css" />
|
||||
<link type="text/css" rel="stylesheet" href="styles.css" />
|
||||
<script src="node_modules/jquery/dist/jquery.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="vertical-stack">
|
||||
<fieldset id="demo" class="box">
|
||||
<legend title="asdf">My Demo</legend>
|
||||
<div id="output"></div>
|
||||
</fieldset>
|
||||
|
||||
<section class="box">
|
||||
<button id="btnGo" class="action-button">Go</button>
|
||||
</section>
|
||||
</div>
|
||||
<footer class="footer">copyright © 2024 <a href="https://sfcoder.me">Tom Hicks</a> licensed under <a href="https://opensource.org/license/gpl-2-0">GPL v2.0 or later</a></footer>
|
||||
<script src="main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
5
main.js
Normal file
5
main.js
Normal file
@@ -0,0 +1,5 @@
|
||||
(()=>{
|
||||
jQuery(() => {
|
||||
console.log('Ready');
|
||||
})
|
||||
})();
|
||||
11
package.json
Normal file
11
package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "demo",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"author": "Tom Hicks <headhunter3@gmail.com>",
|
||||
"license": "GLPv2",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"jquery": "^3.7.1"
|
||||
}
|
||||
}
|
||||
8
reset.css
Normal file
8
reset.css
Normal file
@@ -0,0 +1,8 @@
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
margin: 0;
|
||||
}
|
||||
0
styles.css
Normal file
0
styles.css
Normal file
8
yarn.lock
Normal file
8
yarn.lock
Normal file
@@ -0,0 +1,8 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
jquery@^3.7.1:
|
||||
version "3.7.1"
|
||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de"
|
||||
integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==
|
||||
Reference in New Issue
Block a user