This file contains hidden or 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
| import { defineBuildConfig } from 'unbuild' | |
| export default defineBuildConfig({ | |
| entries: ['./src/index'], | |
| sourcemap: true, | |
| rollup: { | |
| emitCJS: true, | |
| esbuild: { | |
| minify: true, | |
| }, |
This file contains hidden or 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
| # 在项目根目录下添加一个虚拟环境 venv | |
| python3 -m venv venv | |
| # 激活虚拟环境 | |
| source venv/bin/activate | |
| # 在虚拟环境下安装依赖,依赖隔离 | |
| pip install -r requirement.txt | |
| # 退出虚拟环境 | |
| deactivate |
This file contains hidden or 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
| /** 格式化日期时间 | |
| * | |
| * 占位符说明: {@link https://day.js.org/docs/zh-CN/display/format 参考 dayjs} | |
| * | |
| * @example | |
| * ```ts | |
| * const now = new Date() | |
| * formatDateTime(now, 'YYYY-MM-DD HH:mm:ss') // 2022-10-16 12:00:00 | |
| * formatDateTime(now, 'YYYY年MM月DD日 星期dd HH:mm:ss') // 2022年10月16日 星期日 12:00:00 | |
| * formatDateTime(now, 'YYYY-MM-DD 第Q季度 第ww周') // 2022-10-16 第4季度 第43周 |
This file contains hidden or 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
| async function handleRequest(request) { | |
| const ip = request.headers.get("cf-connecting-ip") | |
| return new Response(ip, {status: 200}) | |
| } | |
| addEventListener('fetch', event => { | |
| return event.respondWith(handleRequest(event.request)) | |
| }) |
This file contains hidden or 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
| { | |
| "emojis": [ | |
| {"emoji": "👩👩👧👧", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👧", "category": "p", "order": ""}, | |
| {"emoji": "👩👩👧👦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👦", "category": "p", "order": ""}, | |
| {"emoji": "👩👩👦👦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "👩‍👩‍👦‍👦", "category": "p", "order": ""}, | |
| {"emoji": "👨👩👧👧", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👧", "category": "p", "order": ""}, | |
| {"emoji": "👨👩👧👦", "name": "family_children", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👦", "category": "p", "order": ""}, | |
| {"emoji": "👨👩👦👦", "name": "family_two_boys", "shortname": "", "unicode": "", "html": "👨&zw |