-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
135 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/log | ||
/db | ||
/ui | ||
**/*.js | ||
tc.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
echo "building ismism.ts\n" | ||
|
||
rm -f cli/*.js | ||
rm -rf ui | ||
mkdir ui | ||
|
||
cd ismism.ts | ||
|
||
set -e | ||
deno check src/ser.ts ui/bind/bind.ts | ||
deno run -A cli/bundle.ts src/ser ui/bind/bind | ||
deno run -A ui/ui.ts | ||
|
||
mv src/ser.js ../cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { bundle } from "https://deno.land/x/[email protected]/mod.ts" | ||
|
||
await Promise.all(Deno.args.map(async p => { | ||
const b = await bundle(`${p}.ts`) | ||
const c = b.code | ||
await Deno.writeTextFile(`${p}.js`, c) | ||
})) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log("从零开发!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html lang="zh-CN"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>主义主义</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta http-equiv="refresh" content="3600"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="//s1.ax1x.com/2023/06/15/pCu2bZQ.png"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="//s1.ax1x.com/2023/06/15/pCu2LIs.png"> | ||
<link rel="icon" type="image/png" href="//s1.ax1x.com/2023/06/15/pCu25xf.png"> | ||
<link rel="apple-touch-icon" sizes="180x180" href="//s1.ax1x.com/2023/06/15/pCu25xf.png"> | ||
</head> | ||
|
||
<template></template> | ||
|
||
<style></style> | ||
|
||
<body> | ||
<nav> | ||
<menu> | ||
<li><a href="">主义主义</a></li> | ||
<li><a href="#soc">同城俱乐部</a></li> | ||
<li><a href="#wsl">法律援助</a></li> | ||
<li><a href="#lit">理论学习</a></li> | ||
<li><a href="#pas">用户登录</a></li> | ||
</menu> | ||
</nav> | ||
<hr> | ||
<div id="main"></div> | ||
</body> | ||
|
||
<script></script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const [index, bind] = await Promise.all([ | ||
Deno.readTextFile("./ui/index/index.html"), | ||
Deno.readTextFile("./ui/bind/bind.js"), | ||
]) | ||
|
||
const ui = index | ||
.replace("<script></script>", `<script type="module">${bind}</script>`) | ||
|
||
console.log(`emitting ui/index.html #${ui.length}`) | ||
Deno.writeTextFileSync("../ui/index.html", ui) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,51 @@ | ||
## 代码结构 | ||
|
||
* `cli` 命令接口 `command line interface` | ||
* `src` 源代码 `source` | ||
* `ont` 基础操作 `ontic` | ||
- `base.ts` 进制转换 | ||
- `utc.ts` 时间格式 `Universal Time Convention` | ||
- `crypt.ts` 签名验证 `cryptography` | ||
- `jwt.ts` 身份验证 `JSON Web Token` | ||
- `adm.ts` 行政区划 `administrative region` | ||
- `json.ts` JSON数据声明 | ||
* `eid` 核心操作 `eidetic` | ||
- `typ.ts` 数据类型声明 `type` | ||
- `db.ts` 数据库初始化与数据操作类型声明 `database` | ||
- `is.ts` 数据定义与检查 | ||
- `id.ts` 实体数据操作 `identity` | ||
- `usr.ts` 用户数据操作 `user` | ||
- `soc.ts` 俱乐部数据操作 `sociation` `social` | ||
- `agd.ts` 活动数据操作 `agenda` | ||
- `rec.ts` 记录数据操作 `record` - `credit` `debit` `earn` | ||
- `msg.ts` 文章数据操作 `message` - `wsl` `lit` | ||
- `aut.ts` 权限数据操作 `author` `authority` | ||
* `pra` 业务操作 `praxic` | ||
- `can.ts` 操作权限 | ||
- `doc.ts` 数据组合 `document` | ||
- `que.ts` 查询接口 `query` | ||
- `pas.ts` 用户登陆 `pass` | ||
- `que.ts` 查询接口 `query` `HTTP GET` 对数据组合做请求 | ||
- `pas.ts` 用户登陆 `pass` (的操作组合) | ||
- `pre.ts` 创建操作 `pre-data` `prepare` (的操作组合) | ||
- `put.ts` 更新操作 `put-data`(的操作组合) | ||
- `pos.ts` 请求接口 `post` `HTTP POST` 对操作组合做请求 | ||
* `ser.ts` 服务接口 `serve` | ||
* `tst` 测试代码 `tests` | ||
* `ui` 图形界面 `user interface` | ||
* `ismism.ts` 编译环境 | ||
* `cli` 命令接口 `command line interface` | ||
- `sendsms.ts` 发送测试短信 | ||
- `bundle.ts` 编译并打包 `build and bundle` | ||
* `src` 源代码 `source` | ||
* `ont` 基础操作 `ontic` | ||
- `base.ts` 进制转换 | ||
- `utc.ts` 时间格式 `Universal Time Convention` | ||
- `crypt.ts` 签名验证 `cryptography` | ||
- `jwt.ts` 身份验证 `JSON Web Token` | ||
- `adm.ts` 行政区划 `administrative region` | ||
- `json.ts` JSON数据声明 | ||
* `eid` 核心操作 `eidetic` | ||
- `typ.ts` 数据类型声明 `type` | ||
- `db.ts` 数据库初始化与数据操作类型声明 `database` | ||
- `is.ts` 数据定义与检查 | ||
- `id.ts` 实体数据操作 `identity` | ||
- `usr.ts` 用户数据操作 `user` | ||
- `soc.ts` 俱乐部数据操作 `sociation` `social` | ||
- `agd.ts` 活动数据操作 `agenda` | ||
- `rec.ts` 记录数据操作 `record` - `credit` `debit` `earn` | ||
- `msg.ts` 文章数据操作 `message` - `wsl` `lit` | ||
- `aut.ts` 权限数据操作 `author` `authority` | ||
* `pra` 业务操作 `praxic` | ||
- `can.ts` 操作权限 | ||
- `doc.ts` 数据组合 `document` | ||
- `que.ts` 查询接口 `query` `HTTP GET` 对数据组合做请求 | ||
- `pas.ts` 用户登陆 `pass` (的操作组合) | ||
- `pre.ts` 创建操作 `pre-data` `prepare` (的操作组合) | ||
- `put.ts` 更新操作 `put-data`(的操作组合) | ||
- `pos.ts` 请求接口 `post` `HTTP POST` 对操作组合做请求 | ||
* `ser.ts` 服务接口 `serve` | ||
* `tst` 测试代码 `tests` | ||
* `ui` 图形界面 `graphical user interface` | ||
* `index` UI声明(HTML/CSS) | ||
- `index.html` UI入口 | ||
- `template.html` UI元素 | ||
- `style.css` UI样式 | ||
* `bind` UI定义(TS/JS)绑定服务器端与浏览器端的数据 | ||
- `bind.ts` 绑定UI入口 | ||
- `template.ts` 绑定UI元素 | ||
* `ui.ts` 打包UI `ui bundle` | ||
* `cli` 命令接口(运行环境)(服务器端) | ||
- `build.zsh` 构建运行环境 | ||
* `ui` 图形界面(运行环境)(浏览器端) | ||
* `mongod.service` `mongod.yaml` 数据库配置(服务器端) | ||
* `nginx.conf` 端口配置(服务器端) | ||
|
||
## [系列视频](https://space.bilibili.com/483417795/video) |