Skip to content

Commit 7ff602a

Browse files
committed
Make the default NPM template configuration work as-is
1 parent 47fa27c commit 7ff602a

File tree

3 files changed

+58
-7
lines changed

3 files changed

+58
-7
lines changed

templates/html5/npm/index.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
5+
<meta charset="utf-8">
6+
7+
<title>::APP_TITLE::</title>
8+
9+
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
10+
<meta name="mobile-web-app-capable" content="yes">
11+
12+
::if favicons::::foreach (favicons)::
13+
<link rel="::__current__.rel::" type="::__current__.type::" href="::__current__.href::">::end::::end::
14+
15+
::if linkedLibraries::::foreach (linkedLibraries)::
16+
<script type="text/javascript" src="::__current__::"></script>::end::::end::
17+
<script type="text/javascript" src="./::APP_FILE::.js"></script>
18+
19+
<script>
20+
window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, { capture: false, passive: false });
21+
if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) {
22+
var meta = document.getElementById ("viewport");
23+
meta.setAttribute ('content', 'width=device-width, initial-scale=' + (2 / window.devicePixelRatio) + ', user-scalable=no');
24+
}
25+
</script>
26+
27+
<style>
28+
html,body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
29+
#content { ::if (WIN_BACKGROUND)::background: #000000; ::end::width: ::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_WIDTH::px::else::100%::end::; height: ::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_HEIGHT::px::else::100%::end::; }
30+
::foreach assets::::if (type == "font")::::if (cssFontFace)::::cssFontFace::::end::::end::::end::
31+
</style>
32+
33+
</head>
34+
<body>
35+
::foreach assets::::if (type == "font")::
36+
<span style="font-family: ::id::"> </span>::end::::end::
37+
38+
<div id="content"></div>
39+
40+
<script type="text/javascript">
41+
lime.embed ("::APP_FILE::", "content", ::WIN_WIDTH::, ::WIN_HEIGHT::);
42+
</script>
43+
44+
</body>
45+
</html>

templates/html5/npm/package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
"version": "::META_VERSION::",
44
"private": true,
55
"scripts": {
6-
"lime:preupdate": "node -e \"/* (Optional) preupdate: Run tasks before Lime tools update (prepare environment, sync assets, etc) */\"",
7-
"lime:update": "node -e \"/* (Optional) update: Run tasks after Lime tools update (verify updates, log info, etc) */\"",
8-
"lime:prebuild": "node -e \"/* (Optional) prebuild: Run tasks before Lime tools build (codegen, preprocess assets, etc) */\"",
9-
"lime:build": "node -e \"/* (Optional) build: Run tasks after Lime tools build (optimize artifacts, copy files, etc) */\"",
10-
"lime:run": "node -e \"/* (Required) run: Run build output (vite preview, npx serve, npx http-server) */\"",
11-
"lime:test": "node -e \"/* (Required) test: Start dev server/watch mode for non-final builds; replaces build and run lifecycle */\""
6+
"lime:preupdate": "",
7+
"lime:update": "",
8+
"lime:prebuild": "",
9+
"lime:build": "vite build",
10+
"lime:run": "vite preview ::if (FLAG_PORT != null)::-p ::FLAG_PORT::::end:: ::if (FLAG_NOLAUNCH != null)::::else::--open::end::",
11+
"lime:test": "vite ::if (FLAG_PORT != null)::-p ::FLAG_PORT::::end:: ::if (FLAG_NOLAUNCH != null)::::else::--open::end::"
12+
},
13+
"devDependencies": {
14+
"vite": "^8.0.0"
1215
}
13-
}
16+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
publicDir: "bin"
3+
};

0 commit comments

Comments
 (0)