Basic test website
This commit is contained in:
parent
8a98260f28
commit
16796dea31
7 changed files with 1555 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
*~
|
||||
/node_modules/
|
||||
/build/
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ Then, the command ~npm run preview~ will start the backend and frontend.
|
|||
There are 3 main folders in this template that you should pay attention to.
|
||||
- ~app~ contains all frontend application code, including HTML, CSS, and manifest/JS code necessary for a PWA.
|
||||
- ~app.scm~ in the ~app~ directory is the entry point for the Nitinol application - i.e. the script that is loaded by the HTML template.
|
||||
- The Nitinol libraries are made automatically available to ~app.scm~ via a script tag in the HTML template.
|
||||
- ~server~ contains all backend server code, with the ~server.scm~ file being the entry point used to start the backend.
|
||||
- ~lib~ contains libraries potentially shared between the front and back end, as well as [[https://git.cyan.sh/BirDt/nitinol][Nitinol]] LIPS libraries included as a git submodule.
|
||||
- ~npm run nitinol:update~ will update the Nitinol submodule.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
(m.mount
|
||||
document.body
|
||||
(mithril:comp
|
||||
(sxml
|
||||
(main
|
||||
(h1 "Nitinol App Template")))))
|
||||
|
||||
16
app/index.html
Normal file
16
app/index.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>
|
||||
Nitinol App Template
|
||||
</title>
|
||||
<!-- Load and bootstrap LIPS. -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/lips@beta/dist/lips.min.js" bootstrap></script>
|
||||
<script type="text/x-scheme">(load "/lib/nitinol/nitinol.scm")</script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Load main app script. -->
|
||||
<script type="text/x-scheme" src="/app.scm"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 1c3f8a90a37066d6fe4e04aab53aef873ef79666
|
||||
Subproject commit c3520a5b323a367e1f600124641095c59cb1163d
|
||||
1520
package-lock.json
generated
1520
package-lock.json
generated
File diff suppressed because it is too large
Load diff
10
package.json
10
package.json
|
|
@ -6,10 +6,18 @@
|
|||
"license": "AGPL-3.0-or-later",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"build:frontend": "rm -rf build/app && mkdir -p build/app && cp -R app/* build/app/. && cp -R lib build/app/lib",
|
||||
"watch:frontend": "onchange 'app/**/*' 'lib/**/*' -- npm run build:frontend",
|
||||
"start:frontend": "serve build/app",
|
||||
"preview": "npm run build:frontend && concurrently \"npm run watch:frontend\" \"npm run start:frontend\""
|
||||
},
|
||||
"dependencies": {
|
||||
"lips": "^1.0.0-beta.20",
|
||||
"mithril": "^2.3.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^10.0.3",
|
||||
"onchange": "^7.1.0",
|
||||
"serve": "^14.2.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue