android: add web shell
This commit is contained in:
23
doric-js/bundle/doric-web.html
Normal file
23
doric-js/bundle/doric-web.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>这是一个HTML5的网页</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Hello HTML5</p>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
function addScriptElement(scriptId, source) {
|
||||
const scriptElement = document.createElement("script");
|
||||
scriptElement.type = "text/javascript";
|
||||
scriptElement.id = scriptId;
|
||||
scriptElement.src = source;
|
||||
document.body.appendChild(scriptElement);
|
||||
}
|
||||
function removeScriptElement(scriptId) {
|
||||
const scriptElement = document.getElementById(scriptId);
|
||||
document.body.removeChild(scriptElement);
|
||||
}
|
||||
</script>
|
||||
</html>
|
10
doric-js/index.web.html
Normal file
10
doric-js/index.web.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>这是一个HTML5的网页</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Hello HTML5</p>
|
||||
</body>
|
||||
</html>
|
@@ -6,8 +6,8 @@
|
||||
"types": "index.d.ts",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "tsc -p tsconfig.es5.json && mv -f lib-es5/src/ui/view.es5.js lib-es5/src/ui/view.js && tsc -d -p . && rollup -c && dts-bundle --configJson dts-bundle.json && cat src/image.d.ts >> index.d.ts",
|
||||
"build-win32": "tsc -p tsconfig.es5.json && tsc -d -p . && rollup -c && dts-bundle --configJson dts-bundle.json",
|
||||
"build": "cp -rf index.web.html bundle/doric-web.html && tsc -p tsconfig.es5.json && mv -f lib-es5/src/ui/view.es5.js lib-es5/src/ui/view.js && tsc -d -p . && rollup -c && dts-bundle --configJson dts-bundle.json && cat src/image.d.ts >> index.d.ts",
|
||||
"build-win32": "cp -rf index.web.html bundle/doric-web.html && tsc -p tsconfig.es5.json && tsc -d -p . && rollup -c && dts-bundle --configJson dts-bundle.json",
|
||||
"dev": "tsc -w -p . & rollup -c -w",
|
||||
"clean": "rm -rf lib && rm -rf lib-es5 && rm -rf bundle",
|
||||
"prepublish": "npm run build"
|
||||
|
Reference in New Issue
Block a user