埋点方案 基于目前的了解,主流的埋点方案有三种: 代码埋点:国内老牌厂商的方案,如友盟、百度统计,大型云服务商 (如阿里云、华为云) 也有提供。 可视化埋点 (无痕埋点):通过可视化工具生成配置,在前端解析配置完成埋点,美团正在使用的方案,ref1,ref2。 无埋点:监控所有事件,由后端过滤出有用信息,百度有相关产品,但是年久失修,ref。 由于只有代码埋点支持后端实现,其他埋点方案中语境仅指向前端。 2023-08-21
pnpm monorepo 快速入门 引言闲话休提。想来看这篇文章的人已经对 Monorepo 有所耳闻,想必也不需要大量话语来论述其利弊,所以我们直接开始吧。 创建 workspace首先我们需要初始化项目,pnpm init,如果做过这一步就直接往下。然后在项目根目录添加 pnpm-workspace.yaml,填入如下内容: 12packages: - 'packages/*' 然后在项目根目录创建 pa 2022-12-02 简单记录
pnpm monorepo quick start IntroductionWhen you open this article, I acquiesce that you know about monorepo, so I don’t want to talk nonsense, let’s start straight way. Create a workspaceFirst, you need to initialize your proje 2022-12-02 #pnpm #monorepo
简单讲讲 Nashi.js 很久没写中文博客了,今天来除草一下。 这段时间一直在忙着写一套自己的前端体系(就像阿里系整的 antd、ahooks、antv 全家桶),Nashi.js 就是其中的一部分。 这篇文章大概分为三部分,动机、设计和实现,带你了解 Nashi.js 的前世今生。 开始之前挂一下项目地址,关注 nashi.js 喵,关注 nashi.js 谢谢喵,希望大家多点 star( Github StackBli 2022-11-10 简单记录
How to make a modern npm package I’ve been working on an npm package for a while now, in an age of ESM and CJS going hand in hand, it is not enough that you add just one of these supports to your npm package. Now, I will show you my 2022-09-11 #npm #package
Vue3 i18n best practice Recently, I’ve been working on a front-end project with i18n support, and I’d like to note the steps here. Step 1: Install dependency1pnpm add vue-i18n@9 As of now, we have no other choice. Step 2: C 2022-08-10 #vue #vue3 #i18n
Setup Windows for development Recently I wiped my Windows computer because of my cluttered config, and I’m here to tell you how to set up an elegant environment. configure shellAt first, you need a terminal application, I choose W 2022-08-08 #windows #development
Use Pure ESM package in TypeScript Project When you write a Node.js application using TypeScript, the default configuraion will treat the ESM package as CommonJS package, just like this: 1234567// before compileimport execa from "execa&qu 2022-08-06 #esm #typescript
Optimize the use of if-else, you need a better selective structure! I don’t know if you’ve ever encountered an if-else nesting like a pyramid placed horizontally: 1234567891011121314if (true) {}if (true) {}if (true) { if (true) { if ( 2022-07-07 #optimize #code-style
你好,Wasm! WebAssembly(缩写为 Wasm)是基于堆栈的虚拟机的二进制指令格式。Wasm 被设计为编程语言的可移植编译目标,支持在 Web 上部署客户端和服务器应用程序。 安装环境wasm 需要从一种语言编译成二进制码,我们这里选 C 语言,由于今天只是浅尝辄止,不想污染我的 Windows 开发环境,所以今天的案例跑在 wsl。 需要的软件列表如下: Git:版本管理工具,wasm 的编译器 2022-05-18 简单记录