├── .nvmrc
├── .prettierrc.cjs
├── docs
├── log.txt
├── .vitepress
│ ├── public
│ │ ├── favicon.ico
│ │ └── vercel.json
│ ├── settings
│ │ ├── index.ts
│ │ ├── router.ts
│ │ ├── themeConfig.ts
│ │ └── head.ts
│ ├── theme
│ │ ├── index.ts
│ │ └── utils
│ │ │ └── router.ts
│ └── config.ts
├── 如何使用掘金社区
│ ├── 22-深入掘金:👨💻 如何通过掘金找到好工作.md
│ ├── 2-了解掘金:⚖️ 掘金基本法.md
│ ├── 19-深入掘金:📚 如何贡献掘金的标签.md
│ ├── 18-使用掘金:💬 如何给掘金社区提建议 & Bug.md
│ ├── 20-深入掘金:💸 如何在掘金投放广告.md
│ ├── 6-了解掘金:📖 掘金术语.md
│ ├── 7-使用掘金:👤 掘金的账号系统.md
│ ├── 17-使用掘金:👩🎓字学模块介绍.md
│ ├── 5-了解掘金:掘友等级体系.md
│ ├── index.md
│ ├── 15-使用掘金:🎈 如何玩转沸点.md
│ ├── 1-了解掘金:❓ 为什么做掘金社区.md
│ ├── intro.md
│ ├── 21-深入掘金:💰 如何通过掘金赚钱.md
│ ├── 4-了解掘金:🏆 掘力值、创作者等级与权限(新).md
│ ├── 13-使用掘金:❎ 掘金社区行为规范&处罚措施.md
│ ├── 11-使用掘金:📐 掘金社区内容的标准和规范.md
│ ├── 3-了解掘金:⛏️ 掘金的功能简介.md
│ ├── 23-⚠️ 常见问题.md
│ └── 10-使用掘金:👮♀️掘金的内容审核和推荐规则.md
├── index.md
├── 源码共读第一期|掘金会员专属活动
│ ├── 26-前端|classnames.md
│ ├── 30-前端|Vue团队核心成员开发的39行小工具 install-pkg 安装包.md
│ ├── 10-前端|axios 工具函数.md
│ ├── 8-前端|为什么 Vue2 this 能够直接获取到 data 和 methods.md
│ ├── 23-前端|create-vue Vue 团队公开的全新脚手架工具.md
│ ├── 31-前端|open 打开浏览器.md
│ ├── 22-前端|element 初始化组件功能.md
│ ├── 33-前端|delay 带取消功能的延迟函数.md
│ ├── 28-前端|一行代码统一规范 包管理器.md
│ ├── 20-前端|揭秘 create-vite 原理.md
│ ├── 9-前端|yocto-queue 队列 链表.md
│ ├── 27-前端| js-cookie.md
│ ├── 12-前端|await-to-js 如何优雅的捕获 await 的错误.md
│ ├── 16-前端|p-limit 限制并发数.md
│ ├── 29-前端|项目中常用的 .env 文件原理是什么?如何实现?.md
│ ├── 5-前端|omit.js 剔除对象中的属性.md
│ ├── 13-前端|promisify.md
│ ├── 7-前端|vue2工具函数.md
│ ├── 18-前端|如何发布一个 npm 库,自动化管理版本号、生成 changelog、tag 等.md
│ ├── 21-前端|vue 3.2 是怎么发布的 vue-release.md
│ ├── intro.md
│ ├── 14-前端|mitt、tiny-emitter 发布订阅.md
│ ├── 11-前端|vue3 工具函数.md
│ ├── 24-前端|tdesign-vue 初始化组件.md
│ ├── 25-前端|为 vite 项目自动添加 eslint 和 prettier.md
│ ├── 19-前端| 跟着 vant-weapp 学习开发小程序组件.md
│ ├── 15-前端|跟着underscore学防抖.md
│ ├── 6-前端|arrify 转数组.md
│ ├── 2-后端|Netty 学习 第二周.md
│ ├── 3-后端|Netty 学习 第三周.md
│ ├── 4-后端|Netty 学习 第四周.md
│ ├── 17-前端| koa-compose.md
│ ├── index.md
│ └── 32-前端|vue-devtools 组件可以打开编辑器.md
├── 如何写一本掘金小册
│ ├── index.md
│ ├── 8-内容变更记录.md
│ ├── 6-如何保护掘金小册的内容版权.md
│ ├── 5-如何维护读者的提问和反馈.md
│ ├── 4-如何定价并正式发布售卖小册.md
│ ├── intro.md
│ ├── 7-有小册想法,如何成为小册作者.md
│ ├── 2-如何使用掘金发布小册.md
│ └── 1-什么是掘金小册.md
└── 稀土开发者大会2022
│ ├── 1-谭待:大会致辞.md
│ ├── 23-陈婧文:智能座舱 AI 推荐.md
│ ├── 19-崔洪波、姚煜:英特尔与您共举汽车行业的数字化未来.md
│ ├── 55-许金柱:携程在数据库选型方面的探索与实践.md
│ ├── 29-梁宇宁:开源:商业成功的保障?.md
│ ├── 2-程从超:助力开放生态建设,解锁基础设施潜能.md
│ ├── 54-陈尧:携程在数据库选型方面的探索与实践.md
│ ├── 24-刘涛:车载语音对话新体验.md
│ ├── 6-陈满砚:一次 300 人参与、周期一年的单盲实验.md
│ ├── 5-王保平(玉伯):技术人如何做产品.md
│ ├── 65-陆扬:视频云的机遇挑战与最佳实践方案.md
│ ├── 63-任晓蕾:云原生数据库技术趋势与英特尔最佳实践.md
│ ├── 25-李志明:采用 CXL 加速内存架构演进.md
│ ├── 32-翟佳:从0-1:锻造开源创业团队的道与术.md
│ ├── 35-陈驰远:CTO 职责体系构建:商业、团队和技术.md
│ ├── 3-何晓冬:多模态智能人机对话交互技术的发展与产业实践.md
│ ├── 47-王越:创作正当时,相伴共成长.md
│ ├── 28-刘建航:AI 专有芯片如何平衡高性能和通用性.md
│ ├── 30-黄东旭:在全球化和多云环境中看开源软件的商业化探索.md
│ ├── 56-夏磊:如何利用 Intel 加速工具构建端到端的高性能应用.md
│ ├── 20-李银龙:数据驱动的智能驾驶云.md
│ ├── 10-刘凡:Google Cloud 为您的云原生软件交付链保驾护航.md
│ └── 11-于鸿磊:云原生技术跨向生物信息计算领域的最后十公里.md
├── src
├── spider
│ └── task
│ │ ├── index.ts
│ │ ├── common.ts
│ │ └── spiderAll.ts
├── utils
│ ├── regx
│ │ └── index.ts
│ ├── index.ts
│ ├── data
│ │ └── index.ts
│ ├── cookie
│ │ └── index.ts
│ ├── course
│ │ └── index.ts
│ ├── parse
│ │ └── index.ts
│ ├── request
│ │ └── index.ts
│ ├── puppeteer
│ │ └── index.ts
│ ├── command
│ │ └── index.ts
│ └── logger
│ │ └── index.ts
├── types.d.ts
├── config
│ └── index.ts
└── index.ts
├── .npmrc
├── .lintstagedrc
├── .editorconfig
├── .github
└── workflows
│ ├── pr-welcome.yml
│ ├── emoji-helper.yml
│ ├── notfoundbot.yml
│ ├── automerge.yml
│ ├── issue-label.yml
│ ├── contributor-help.yml
│ ├── clear.yml
│ ├── images.yml
│ ├── sync.yml
│ ├── deploy.yml
│ ├── issue-reply.yml
│ └── test.yml
├── .prettierignore
├── .eslintrc.cjs
├── scripts
└── build.js
├── tsconfig.json
├── .gitignore
├── .env
└── package.json
/.nvmrc:
--------------------------------------------------------------------------------
1 | 18
--------------------------------------------------------------------------------
/.prettierrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = require('@femm/prettier')
2 |
--------------------------------------------------------------------------------
/docs/log.txt:
--------------------------------------------------------------------------------
1 | Triggered by schedule at Sat Nov 9 14:30:42 UTC 2024
2 |
--------------------------------------------------------------------------------
/src/spider/task/index.ts:
--------------------------------------------------------------------------------
1 | export * from './common'
2 | export * from './spiderAll'
3 |
--------------------------------------------------------------------------------
/docs/.vitepress/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/juejinBooksSpider/HEAD/docs/.vitepress/public/favicon.ico
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | # https://docs.npmjs.com/cli/configuring-npm/npmrc/
2 | # https://pnpm.io/npmrc
3 |
4 | registry=https://registry.npmmirror.com
5 |
--------------------------------------------------------------------------------
/src/utils/regx/index.ts:
--------------------------------------------------------------------------------
1 | export const ValidUrl = /https:\/\/juejin.cn\/book\/(\d+)/
2 | export function isValidUrl(url) {
3 | return ValidUrl.test(url)
4 | }
5 |
--------------------------------------------------------------------------------
/docs/.vitepress/settings/index.ts:
--------------------------------------------------------------------------------
1 | export * from './head'
2 | // export * from './nav'
3 | // export * from './sidebar'
4 | export * from './router'
5 | export * from './themeConfig'
6 |
--------------------------------------------------------------------------------
/.lintstagedrc:
--------------------------------------------------------------------------------
1 | {
2 | "*.{json,json5,jsonc}": ["eslint --fix"],
3 | "*.{css,scss,less}": ["prettier --write"],
4 | "*.{js,cjs,mjs,jsx,ts,tsx,mts,cts,vue,html,md,yaml,yml}": ["eslint --fix", "prettier --write"]
5 | }
6 |
--------------------------------------------------------------------------------
/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './logger'
2 | export * from './data'
3 | export * from './regx'
4 | export * from './cookie'
5 | export * from './course'
6 | export * from './request'
7 | export * from './parse'
8 | export * from './puppeteer'
9 | export * from './command'
10 |
--------------------------------------------------------------------------------
/docs/.vitepress/public/vercel.json:
--------------------------------------------------------------------------------
1 | {
2 | "headers": [
3 | {
4 | "source": "/assets/(.*)",
5 | "headers": [
6 | {
7 | "key": "Cache-Control",
8 | "value": "max-age=31536000, immutable"
9 | }
10 | ]
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | charset = utf-8
7 | end_of_line = lf
8 | indent_size = 2
9 | indent_style = space
10 | insert_final_newline = true
11 | trim_trailing_whitespace = true
12 |
13 | [*.md]
14 | trim_trailing_whitespace = false
15 |
--------------------------------------------------------------------------------
/.github/workflows/pr-welcome.yml:
--------------------------------------------------------------------------------
1 | name: PR Welcome
2 |
3 | on:
4 | pull_request_target:
5 | types: [opened]
6 |
7 | jobs:
8 | welcome:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions-cool/pr-welcome@v1.1.2
12 | with:
13 | pr-emoji: '+1, heart'
14 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | # See https://github.com/prettier/prettier/blob/main/docs/ignore.md
2 |
3 | # dependencies
4 | node_modules
5 |
6 | # compiled output
7 | dist
8 | build
9 | cache
10 | .cache
11 | .temp
12 | .tmp
13 |
14 | # lock files
15 | pnpm-lock.yaml
16 | package-lock.json
17 | yarn.lock
18 |
--------------------------------------------------------------------------------
/src/utils/data/index.ts:
--------------------------------------------------------------------------------
1 | import dayjs from 'dayjs'
2 |
3 | export function formatDate(date?: Date | string | number, format = 'YYYY-MM-DD HH:mm:ss'): string {
4 | const targetDate = date ? dayjs(date) : dayjs() // 使用当前时间如果未传递日期参数
5 | const formattedDate = dayjs(targetDate).format(format)
6 | return formattedDate
7 | }
8 |
--------------------------------------------------------------------------------
/.github/workflows/emoji-helper.yml:
--------------------------------------------------------------------------------
1 | name: Emoji Helper
2 |
3 | on:
4 | release:
5 | types: [published]
6 |
7 | jobs:
8 | emoji:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions-cool/emoji-helper@v1.0.0
12 | with:
13 | type: 'release'
14 | emoji: '+1, laugh, heart, hooray, rocket, eyes'
15 |
--------------------------------------------------------------------------------
/.github/workflows/notfoundbot.yml:
--------------------------------------------------------------------------------
1 | name: notfoundbot
2 | on:
3 | schedule:
4 | - cron: '0 5 * * *'
5 | jobs:
6 | notfoundbot:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v2
10 | - name: Fix links
11 | uses: tmcw/notfoundbot@v2.0.0-beta.1
12 | env:
13 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 |
--------------------------------------------------------------------------------
/docs/如何使用掘金社区/22-深入掘金:👨💻 如何通过掘金找到好工作.md:
--------------------------------------------------------------------------------
1 | # 深入掘金:👨💻 如何通过掘金找到好工作
2 |
3 | 目前您可以使用「[内推招聘](https://juejin.cn/topic/6819970850532360206 "https://juejin.cn/topic/6819970850532360206")」找到正在招聘的公司职位,或者在「[求职中](https://juejin.cn/topic/6824710203426996238 "https://juejin.cn/topic/6824710203426996238")」主动求职。
4 |
5 | ## 招聘功能
6 |
7 | ⌛️ 开发中
8 |
9 | [原文地址](https://juejin.cn/book/6844733795329900551/section/6844733795388620808)
--------------------------------------------------------------------------------
/src/utils/cookie/index.ts:
--------------------------------------------------------------------------------
1 | export async function setPageCookie(page: { setCookie: (arg0: any) => any }, cookie: string) {
2 | const cookies = cookie.split(';').map((pair) => {
3 | const name = pair.trim().slice(0, pair.trim().indexOf('='))
4 | const value = pair.trim().slice(pair.trim().indexOf('=') + 1)
5 | return { name, value, domain: '.juejin.cn' }
6 | })
7 | await page.setCookie(...cookies)
8 | }
9 |
--------------------------------------------------------------------------------
/docs/如何使用掘金社区/2-了解掘金:⚖️ 掘金基本法.md:
--------------------------------------------------------------------------------
1 | # 了解掘金:⚖️ 掘金基本法
2 |
3 | ## 👍 倡导
4 |
5 | * 分享原创文章、开源项目
6 | * 基于技术及事实分享有价值的信息
7 | * 一个干净的技术讨论环境
8 | * 不断坚持学习和进步
9 |
10 | ## 👎 不欢迎
11 |
12 | * 不文明的讨论和人身攻击
13 | * 错误、虚假、抄袭的内容或标题
14 | * 不劳而获
15 |
16 | ## 🚫 不允许
17 |
18 | * 违反中国或者用户所在国家地区法律法规的行为和内容
19 | * 对网站的运营安全有潜在威胁的内容
20 | * 色情、激进时政、意识形态方面的话题
21 |
22 | [原文地址](https://juejin.cn/book/6844733795329900551/section/6844733795367649288)
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | ## 本小册由 juejinBooksSpider爬取 项目主页 h7ml.github.io/juejinBooksSpider
2 |
3 | ### 小册总览
4 |
5 | - 如何写一本掘金小册
6 |
7 | - 如何使用掘金社区
8 |
9 | - 源码共读第一期|掘金会员专属活动
10 |
11 | - 稀土开发者大会2022
12 |
--------------------------------------------------------------------------------
/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['@antfu/eslint-config-ts', 'plugin:prettier/recommended'],
4 | rules: {
5 | 'new-cap': 'off',
6 | 'no-console': 'off',
7 | 'antfu/if-newline': 'off',
8 | '@typescript-eslint/no-require-imports': 'off',
9 | '@typescript-eslint/no-var-requires': 'off',
10 | 'no-unused-expressions': 'off',
11 | 'no-sequences': 'off',
12 | },
13 | }
14 |
--------------------------------------------------------------------------------
/.github/workflows/automerge.yml:
--------------------------------------------------------------------------------
1 | name: automerge
2 | on: pull_request_target
3 | jobs:
4 | dependabot:
5 | if: github.actor == 'dependabot[bot]'
6 | runs-on: ubuntu-latest
7 | steps:
8 | - name: Enable auto-merge for Dependabot PRs
9 | run: gh pr merge --auto --squash "$PR_URL"
10 | env:
11 | PR_URL: ${{github.event.pull_request.html_url}}
12 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
13 |
--------------------------------------------------------------------------------
/scripts/build.js:
--------------------------------------------------------------------------------
1 | import fs from 'fs-extra'
2 | import { build } from 'esbuild'
3 |
4 | const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'))
5 |
6 | const config = {
7 | bundle: true,
8 | entryPoints: ['src/index.ts'],
9 | outfile: 'dist/index.cjs',
10 | format: 'cjs',
11 | platform: 'node',
12 | target: 'node12',
13 | }
14 |
15 | config.define = { 'process.env.PACKAGE_VERSION': JSON.stringify(pkg.version) }
16 |
17 | build(config)
18 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2017",
4 | "module": "esnext",
5 | "lib": ["esnext", "DOM"],
6 | "baseUrl": ".",
7 | "paths": {
8 | "@/*": ["src/*"]
9 | },
10 | "moduleResolution": "node",
11 | "esModuleInterop": true,
12 | "strict": true,
13 | "strictNullChecks": true,
14 | "resolveJsonModule": true,
15 | "outDir": "dist",
16 | "rootDir": "src"
17 | },
18 | "include": ["src"]
19 | }
20 |
--------------------------------------------------------------------------------
/docs/如何使用掘金社区/19-深入掘金:📚 如何贡献掘金的标签.md:
--------------------------------------------------------------------------------
1 | # 深入掘金:📚 如何贡献掘金的标签
2 |
3 | 掘金里的标签是掘金社区组织内容最基础的形式,每一个标签都需要精心的管理和维护。因而,贡献标签是掘友们较高的一个权限,以防止使用不善导致社区内容混乱的潜在风险。
4 |
5 | ## 掘金共建者权限
6 |
7 | 唯有「掘金共建者」权限的用户可以参与到掘金社区的标签维护和贡献中。如何获得权限请参考:[掘力值、等级与权限](https://juejin.cn/book/6844733795329900551/section/6844733795371843597 "https://juejin.cn/book/6844733795329900551/section/6844733795371843597")
8 |
9 | ## 具体方法
10 |
11 | 🙊 相应权限用户可获得
12 |
13 | [原文地址](https://juejin.cn/book/6844733795329900551/section/6844733795384426510)
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # editor directories and files
4 | .idea
5 | .vscode
6 |
7 | # dependencies
8 | node_modules
9 |
10 | # compiled output
11 | dist
12 | build
13 | cache
14 | .cache
15 | .temp
16 | .tmp
17 |
18 | # log and lock files
19 | *.log
20 | yarn.lock
21 | package-lock.json
22 |
23 | # local env files
24 | .env.local
25 | .env.*.local
26 |
27 | # misc
28 | .DS_Store
29 |
30 | # user-specific files
31 |
32 | **/books/*
33 |
--------------------------------------------------------------------------------
/src/utils/course/index.ts:
--------------------------------------------------------------------------------
1 | import inquirer from 'inquirer'
2 | import { isValidUrl } from '..'
3 |
4 | export async function inquirerCourse() {
5 | const { url } = await inquirer.prompt([
6 | {
7 | type: 'input',
8 | name: 'url',
9 | message: '请输入小册链接:',
10 | validate: (val) => {
11 | if (val && isValidUrl(val)) {
12 | return true
13 | }
14 | return '请输入合法的小册链接,例如https://juejin.cn/book/6844723704639782920'
15 | },
16 | },
17 | ])
18 | return url
19 | }
20 |
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/26-前端|classnames.md:
--------------------------------------------------------------------------------
1 | # 前端|classnames
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. 学会 classnames 的用法
10 | 2. 学会 classnames 的原理
11 | 3. 多关注测试用例
12 |
13 | ## 学习任务
14 |
15 | * 仓库地址:[github.com/JedWatson/c…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FJedWatson%2Fclassnames "https://github.com/JedWatson/classnames")
16 | * 可以多关注测试用例
17 |
18 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7169471505984667678)
--------------------------------------------------------------------------------
/docs/如何写一本掘金小册/index.md:
--------------------------------------------------------------------------------
1 |
如何写一本掘金小册
2 |
3 | 原文地址
4 |
5 | - 1 什么是掘金小册
6 |
7 | - 2 如何使用掘金发布小册
8 |
9 | - 3 如何选题、定提纲和组织内容
10 |
11 | - 4 如何定价并正式发布售卖小册
12 |
13 | - 5 如何维护读者的提问和反馈
14 |
15 | - 6 如何保护掘金小册的内容版权
16 |
17 | - 7 有小册想法,如何成为小册作者
18 |
19 | - 8 内容变更记录
20 |
21 |
--------------------------------------------------------------------------------
/docs/.vitepress/settings/router.ts:
--------------------------------------------------------------------------------
1 | import AutoConfigureNavSidebarPlugin from '@w3ctech-editorial-department/vitepress-auto-configure-nav-sidebar'
2 |
3 | const site = [
4 | {
5 | text: '前端物语',
6 | link: 'https://www.h7ml.cn',
7 | },
8 | ]
9 | const { nav, sidebar } = AutoConfigureNavSidebarPlugin({
10 | ignoreFolders: ['.vitepress', 'public', ''],
11 | ignoreFiles: ['log.txt'],
12 | // dirPrefix: '',
13 | // filePrefix: 'docs',
14 | showNavIcon: false,
15 | showSidebarIcon: true,
16 | collapsed: true,
17 | singleLayerNav: true,
18 | })
19 |
20 | export { nav, sidebar, site }
21 |
--------------------------------------------------------------------------------
/src/utils/parse/index.ts:
--------------------------------------------------------------------------------
1 | import html2md from 'html-to-md'
2 | import hpdf from 'hpdf'
3 |
4 | const generator = new hpdf.PdfGenerator({
5 | min: 3,
6 | max: 10,
7 | })
8 |
9 | export async function toMd(html: string) {
10 | return await html2md(html)
11 | }
12 | export async function toPdf(html: string) {
13 | return await generator.generatePDF(html)
14 | }
15 |
16 | export async function sleepAsync(milliseconds: number): Promise {
17 | // 使用Promise实现异步操作
18 | return new Promise((resolve) => {
19 | // 设置定时器,每隔milliseconds毫秒执行resolve函数
20 | setTimeout(resolve, milliseconds)
21 | })
22 | }
23 |
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/30-前端|Vue团队核心成员开发的39行小工具 install-pkg 安装包.md:
--------------------------------------------------------------------------------
1 | # 前端|Vue团队核心成员开发的39行小工具 install-pkg 安装包
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. 如何学习调试源码
10 | 2. 如何开发构建一个 ts 的 npm 包
11 | 3. 如何配置 github action
12 | 4. 配置属于自己的 eslint 预设、提升版本号等
13 | 5. 学会使用 execa 执行命令
14 | 6. 等等
15 |
16 | ## 学习任务
17 |
18 | * 参考文章 [Vue团队核心成员开发的39行小工具 install-pkg 安装包,值得一学!](https://juejin.cn/post/7039494476913442824 "https://juejin.cn/post/7039494476913442824")
19 |
20 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7176615043759341571)
--------------------------------------------------------------------------------
/docs/如何使用掘金社区/18-使用掘金:💬 如何给掘金社区提建议 & Bug.md:
--------------------------------------------------------------------------------
1 | # 使用掘金:💬 如何给掘金社区提建议 & Bug
2 |
3 | ## 「反馈 & 建议」沸点话题
4 |
5 | 
6 |
7 | 对于日常使用的不便、功能的建议、体验的优化、小 Bug。大家可以直接在沸点话题「[反馈 & 建议](https://juejin.cn/topic/6824710202692993037 "https://juejin.cn/topic/6824710202692993037")」提出,我们的小编都会随时回复,有问题我们也会记录并加入迭代流程。
8 |
9 | ## 联系我们
10 |
11 | 如果上述渠道仍没有满足您的反馈您可以:
12 |
13 | * 发送邮件至 `feedback@xitu.io`
14 | * 直接联系我们的微信号:`chnyifan`
15 |
16 | [原文地址](https://juejin.cn/book/6844733795329900551/section/6844733795384442893)
--------------------------------------------------------------------------------
/.github/workflows/issue-label.yml:
--------------------------------------------------------------------------------
1 | name: Issue Labeled
2 |
3 | # 新增标签时触发
4 | on:
5 | issues:
6 | types: [labeled]
7 |
8 | jobs:
9 | issue-labeled:
10 | # 打标签和提交 issue 的不是同一个人才执行
11 | if: github.actor != github.event.issue.user.login
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Need more info
15 | if: github.event.label.name == 'TODO'
16 | uses: actions-cool/issues-helper@main
17 | with:
18 | actions: 'create-comment'
19 | token: ${{ secrets.GITHUB_TOKEN }}
20 | issue-number: ${{ github.event.issue.number }}
21 | body: |
22 | Something is being better!🥰
23 |
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/10-前端|axios 工具函数.md:
--------------------------------------------------------------------------------
1 | # 前端|axios 工具函数
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. 初步学会看源码
10 | 2. 学会 axios 中的10多个工具函数
11 | 3. 等等
12 |
13 | ## 学习任务
14 |
15 | * 看这篇文章 [阅读axios源码,发现了这些实用的基础工具函数](https://juejin.cn/post/7042610679815241758 "https://juejin.cn/post/7042610679815241758"),看源码。
16 | * [github.com/axios/axios](https://link.juejin.cn/?target=https%3A%2F%2Fgithub.com%2Faxios%2Faxios "https://link.juejin.cn/?target=https%3A%2F%2Fgithub.com%2Faxios%2Faxios")
17 |
18 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7172386546358681611)
--------------------------------------------------------------------------------
/docs/如何使用掘金社区/20-深入掘金:💸 如何在掘金投放广告.md:
--------------------------------------------------------------------------------
1 | # 深入掘金:💸 如何在掘金投放广告
2 |
3 | ## 商业广告位
4 |
5 | 我们有丰富的商业广告合作方案,广告位包含但不限于:
6 |
7 | * 推荐信息流内
8 | * 网站侧边栏
9 | * 文章侧边栏豆腐块
10 | * 移动应用启动页
11 | * 移动应用发现页
12 | * 浏览器插件位
13 |
14 | 等等多个广告位置
15 |
16 | ## 商务合作
17 |
18 | 除了单纯的广告合作,我们还提供多种的商务服务,包含但不限于:
19 |
20 | * 技术沙龙
21 | * 技术大会
22 | * 技术内容传播
23 | * 招聘服务
24 | * 技术征文
25 | * 大型文档翻译
26 |
27 | 等等
28 |
29 | ## 联系我们
30 |
31 | 如果您对我们的商务合作很感兴趣,您可以访问我们的[商务页面](https://bd.juejin.cn "https://bd.juejin.cn")或者联系我们:
32 |
33 | * 发送邮件到 `bd@xitu.io`
34 | * 您也可以直接填写需求,我们会第一时间回复:[需求问卷](https://link.juejin.cn?target=https%3A%2F%2Fwj.qq.com%2Fs%2F1165537%2Fb638 "https://wj.qq.com/s/1165537/b638")
35 |
36 | [原文地址](https://juejin.cn/book/6844733795329900551/section/6844733795384442894)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/8-前端|为什么 Vue2 this 能够直接获取到 data 和 methods.md:
--------------------------------------------------------------------------------
1 | # 前端|为什么 Vue2 this 能够直接获取到 data 和 methods
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. 如何学习调试 vue2 源码
10 | 2. data 中的数据为什么可以用 this 直接获取到
11 | 3. methods 中的方法为什么可以用 this 直接获取到
12 | 4. 学习源码中优秀代码和思想,投入到自己的项目中
13 |
14 | ## 学习任务
15 |
16 | * **没使用过vue2的也可以学习**,有很多基础知识可以复习巩固,比如:构造函数 this 指向 call、bind、apply Object.defineProperty
17 | * 参考文章:[为什么 Vue2 this 能够直接获取到 data 和 methods ? 源码揭秘!](https://juejin.cn/post/7010920884789575711 "https://juejin.cn/post/7010920884789575711")
18 | * 自己动手学会调试vue2源码。
19 | * 将笔记文章链接发在该章节评论区。
20 |
21 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7171799801074450470)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/23-前端|create-vue Vue 团队公开的全新脚手架工具.md:
--------------------------------------------------------------------------------
1 | # 前端|create-vue Vue 团队公开的全新脚手架工具
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习任务
8 |
9 | * 学习 npm init vue@3 npx 等,学会create-vue使用和原理
10 | * 我的掘金文章 [juejin.cn/post/701834…](https://juejin.cn/post/7018344866811740173 "https://juejin.cn/post/7018344866811740173")
11 | * * 按照我文章的配置环境和调试源码的方法调试学习
12 | * 最终可以简单输出笔记
13 | * 也可以参考 upupming 优秀笔记 [www.yuque.com/ruochuan12/…](https://link.juejin.cn?target=https%3A%2F%2Fwww.yuque.com%2Fruochuan12%2Fgroup16%2Fispvpm "https://link.juejin.cn?target=https%3A%2F%2Fwww.yuque.com%2Fruochuan12%2Fgroup16%2Fispvpm")
14 | * 等等
15 |
16 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7176148754586665016)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/31-前端|open 打开浏览器.md:
--------------------------------------------------------------------------------
1 | # 前端|open 打开浏览器
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. 电脑竟然乖乖的帮我打开了浏览器原理和源码实现
10 | 2. 学会使用 Node.js 强大的 child\_process 模块
11 | 3. 学会调试学习源码
12 | 4. 等等
13 |
14 | ## 参考资料
15 |
16 | * [每次启动项目的服务时,电脑竟然乖乖的帮我打开了浏览器,100行源码揭秘!](https://juejin.cn/post/7026505183819464734 "https://juejin.cn/post/7026505183819464734")
17 | * 克隆项目,按照我的文章要求,调试源码学习,最终提交笔记。
18 | * git clone [github.com/lxchuan12/o…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flxchuan12%2Fopen-analysis "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flxchuan12%2Fopen-analysis").git
19 |
20 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7178739821878181926)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/22-前端|element 初始化组件功能.md:
--------------------------------------------------------------------------------
1 | # 前端|element 初始化组件功能
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. 学会调试学习源码
10 | 2. element-ui 如何初始化新的组件
11 | 3. 可以学以致用应用到自己开发的项目中,比如新增页面等
12 | 4. 等等
13 |
14 | ## 学习任务
15 |
16 | * [每次新增页面复制粘贴?100多行源码的 element-ui 新增组件功能告诉你减少重复工作](https://juejin.cn/post/7031331765482422280 "https://juejin.cn/post/7031331765482422280")
17 | * 克隆项目,按照我的文章要求,调试源码学习,最终提交笔记。
18 | * git clone [github.com/lxchuan12/e…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flxchuan12%2Felement-analysis.git "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flxchuan12%2Felement-analysis.git")
19 |
20 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7176145605423530044)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/33-前端|delay 带取消功能的延迟函数.md:
--------------------------------------------------------------------------------
1 | # 前端|delay 带取消功能的延迟函数
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. 学会如何实现一个比较完善的 delay 函数
10 | 2. 学会使用 AbortController 实现取消功能
11 | 3. 学会面试常考 axios 取消功能实现
12 | 4. 等等
13 |
14 | ## 学习任务
15 |
16 | * 参考文章:[面试官:请手写一个带取消功能的延迟函数,axios 取消功能的原理是什么](https://juejin.cn/post/7042461373904715812 "https://juejin.cn/post/7042461373904715812")
17 | * 克隆文章中的项目学习
18 | * 学习源码 [github.com/sindresorhu…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fsindresorhus%2Fdelay%2Fblob%2Fmain%2Findex.js "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fsindresorhus%2Fdelay%2Fblob%2Fmain%2Findex.js")
19 |
20 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7178740343133700107)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/28-前端|一行代码统一规范 包管理器.md:
--------------------------------------------------------------------------------
1 | # 前端|一行代码统一规范 包管理器
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. 如何学习调试源码
10 | 2. 学会 npm 钩子
11 | 3. 学会 "preinstall": "npx only-allow pnpm" 一行代码统一规范包管理器
12 | 4. 学到 only-allow 原理
13 | 5. 等等
14 |
15 | ## 学习任务
16 |
17 | * [从 vue3 和 vite 源码中,我学到了一行代码统一规范团队包管理器的神器](https://juejin.cn/post/7033560885050212389 "https://juejin.cn/post/7033560885050212389")
18 | * 克隆项目,按照我的文章要求,调试源码学习,最终提交笔记。
19 | * git clone [github.com/lxchuan12/o…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flxchuan12%2Fonly-allow-analysis.git "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flxchuan12%2Fonly-allow-analysis.git")
20 |
21 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7176615043595763724)
--------------------------------------------------------------------------------
/docs/稀土开发者大会2022/1-谭待:大会致辞.md:
--------------------------------------------------------------------------------
1 | # 谭待:大会致辞
2 |
3 | 
4 |
5 | 
6 |
7 | 
8 |
9 | 
10 |
11 | 
12 |
13 | [原文地址](https://juejin.cn/book/7127092198096502822/section/7127192279898390567)
--------------------------------------------------------------------------------
/docs/如何写一本掘金小册/8-内容变更记录.md:
--------------------------------------------------------------------------------
1 | # 内容变更记录
2 |
3 | ## 2021
4 |
5 | **06.18 :** 目前,作者在平台的收入将继续实行税费代缴,分成比例为作者70%,平台30%。
6 |
7 | ## 2020
8 |
9 | **01.12 :** 未来的小册将致力于创作者变现,更多的激励策略正在策划中。
10 |
11 | ## 2019
12 |
13 | **09.12 :** 在小册即将上架的前夕,跟财务和税务对接,作者在平台的收入将继续实行税费代缴,分成比例为作者70%,平台30%。
14 |
15 | **03.22 :** 详细描述了小册发布流程的介绍文字,帮助作者更好地理解小册从申请到写作、再到发布的整个流程。具体可见:[如何使用掘金发小册](https://juejin.cn/book/6844723704639782920/section/6844723704753029133 "https://juejin.cn/book/6844723704639782920/section/6844723704753029133")
16 |
17 | **03.01 :** 由于 19 年新税法的发布,平台将对稿费产生相关的税实行代扣代缴,分成调整为作者 50% ,平台 50% 。3 月 1 日之前申请的小册分成策略不变。具体可见:[如何定价并正式发布售卖小册](https://juejin.cn/editor/book/59e414a5518825541b03ce66/section/59e41504f265da43195551aa "https://juejin.cn/editor/book/59e414a5518825541b03ce66/section/59e41504f265da43195551aa")
18 |
19 | [原文地址](https://juejin.cn/book/6844723704639782920/section/6844723704761417742)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/20-前端|揭秘 create-vite 原理.md:
--------------------------------------------------------------------------------
1 | # 前端|揭秘 create-vite 原理
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ### 学习任务
8 |
9 | * 源码:[github.com/vitejs/vite…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fvitejs%2Fvite%2Fblob%2FHEAD%2Fpackages%2Fcreate-vite%2Findex.js "https://github.com/vitejs/vite/blob/HEAD/packages/create-vite/index.js")
10 | * create-vite 不到400行代码;
11 | * 可以学会如何写一个脚手架等等;
12 | * **注意:如果克隆的最新的代码(最新的create-vite已升级为 ts),按照我文中的方式不能调试。推荐使用**`npx esno src/index.ts`**调试源码。**
13 |
14 | ### 参考资料
15 |
16 | * 参考学习若川的文章,按照文章克隆源码,调试学习,写笔记
17 | * [《vite 3.0 都发布了,经常初始化 vite 项目,却不知 create-vite 原理?揭秘!》](https://juejin.cn/post/7125199469796130853 "https://juejin.cn/post/7125199469796130853")
18 |
19 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7169414471885488136)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/9-前端|yocto-queue 队列 链表.md:
--------------------------------------------------------------------------------
1 | # 前端|yocto-queue 队列 链表
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习任务
8 |
9 | * [github.com/sindresorhu…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fsindresorhus%2Fyocto-queue "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fsindresorhus%2Fyocto-queue")
10 | * github1s: [github1s.com/sindresorhu…](https://link.juejin.cn?target=https%3A%2F%2Fgithub1s.com%2Fsindresorhus%2Fyocto-queue%2Fblob%2FHEAD%2Findex.js "https://link.juejin.cn?target=https%3A%2F%2Fgithub1s.com%2Fsindresorhus%2Fyocto-queue%2Fblob%2FHEAD%2Findex.js")
11 | * yocto-queue 源码行数不多, 67 行
12 | * 学习 `Symbol.iterator` 的使用场景
13 | * 可以克隆代码下来,关注测试用例,自己多通过测试用例调试
14 | * 学习链表和数组的区别,时间复杂度
15 |
16 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7172379618341552161)
--------------------------------------------------------------------------------
/.github/workflows/contributor-help.yml:
--------------------------------------------------------------------------------
1 | name: Contributor
2 |
3 | on:
4 | schedule:
5 | - cron: '0 0 * * *'
6 |
7 | jobs:
8 | contributor:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@master
12 |
13 | - uses: actions-cool/contributor-helper@v1
14 | with:
15 | token: ${{ secrets.GITHUB_TOKEN }}
16 | style: 'simple'
17 | update-files: 'README.md'
18 | update-places: '/'
19 |
20 | - name: Commit and push if changed
21 | run: |-
22 | git diff
23 | git config --global user.email "actions@github.com"
24 | git config --global user.name "github-actions"
25 | git pull
26 | git add -A
27 | git commit -m "🤖 docs: Auto update contributors" || exit 0
28 | git push
29 |
--------------------------------------------------------------------------------
/docs/如何使用掘金社区/6-了解掘金:📖 掘金术语.md:
--------------------------------------------------------------------------------
1 | # 了解掘金:📖 掘金术语
2 |
3 | 在更详细地了解掘金之前,我们有必要给大家介绍一下属于掘金的一些特别的掘金术语。这些词汇、文字是掘金的用户们经过长期的贡献和积累一点点营造出来的,也是大家未来在某处彼此相认的法宝!
4 |
5 | ## 基本语法
6 |
7 | * 掘友:掘金的用户对彼此的称呼(自此,我在后面都用掘友来表达掘金用户哦)
8 | * 小编:掘金的日常管理者,用以推荐优质内容、屏蔽错误内容、维护社区日常秩序
9 | * 掘力值(Juejin Power / JP):掘友们在掘金的累计贡献值
10 |
11 | ## 进阶语法
12 |
13 | * 掘学:掘友们经过多年的学习和历练掌握的各项技术
14 | * Panfish:掘金吉祥物 
15 | * [闰土](https://juejin.im/user/360295545446525 "https://juejin.im/user/360295545446525"):掘友们挚爱的掘金当家英短🐱,也可以叫他「土土」,可以来友情投食哦 
16 |
17 | ## 高深语法
18 |
19 | * 驳学:进入到技术探讨的深入层次,互相驳斥对方观点
20 | * 暗号:子非猿,安知掘金之乐也
21 |
22 | [原文地址](https://juejin.cn/book/6844733795329900551/section/6844733795376037902)
--------------------------------------------------------------------------------
/docs/如何使用掘金社区/7-使用掘金:👤 掘金的账号系统.md:
--------------------------------------------------------------------------------
1 | # 使用掘金:👤 掘金的账号系统
2 |
3 | ## 注册、登录
4 |
5 | 掘金支持多种注册方式
6 |
7 | * 手机号
8 | * 第三方登录:微博、微信、GitHub
9 |
10 | 根据国家法律法规《[网络安全法](https://link.juejin.cn?target=http%3A%2F%2Fwww.cac.gov.cn%2F2016-11%2F07%2Fc_1119867116.htm "http://www.cac.gov.cn/2016-11/07/c_1119867116.htm")》,您需要绑定手机号后才可在掘金社区内发布内容。因此,我们会要求您绑定您的手机号。
11 |
12 | 
13 |
14 | ```!
15 | 未绑定手机号的用户可以阅读、点赞、收藏、关注,但是您无法在社区里生产公共内容,如评论、文章、沸点等
16 | ```
17 |
18 | ```!
19 | 部分老用户依然可以使用邮箱登录,但是如果需要生产公共内容,仍需要绑定手机号
20 | ```
21 |
22 | ## 个人账户设置
23 |
24 | * [个人资料](https://juejin.cn/user/settings/profile "https://juejin.cn/user/settings/profile"):修改个人信息
25 | * [账号关联](https://juejin.cn/user/settings/account "https://juejin.cn/user/settings/account"):配置、删除各个关联账号
26 |
27 | [原文地址](https://juejin.cn/book/6844733795329900551/section/6844733795376054285)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/27-前端| js-cookie.md:
--------------------------------------------------------------------------------
1 | # 前端| js-cookie
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. js-cookie 源码
10 | 2. 了解 cookie、localstorage、sessionStorage 的区别
11 | 3. 等等
12 |
13 | ## 学习任务
14 |
15 | * 参考文章:[github.com/haixiangyan…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fhaixiangyan%2Fmy-js-cookie "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fhaixiangyan%2Fmy-js-cookie")
16 | * 学习 [js-cookie](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fjs-cookie%2Fjs-cookie "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fjs-cookie%2Fjs-cookie") 源码
17 | * 仓库:[github.com/js-cookie/j…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fjs-cookie%2Fjs-cookie "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fjs-cookie%2Fjs-cookie")
18 |
19 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7176615016903213088)
--------------------------------------------------------------------------------
/docs/如何使用掘金社区/17-使用掘金:👩🎓字学模块介绍.md:
--------------------------------------------------------------------------------
1 | # 使用掘金:👩🎓字学模块介绍
2 |
3 | ## 字学版块
4 |
5 | 字学是字节跳动联合掘金为学生用户打造的专属平台,旨在让学生用户通过自我学习获得成长,字学将提供知识、技能、品格这三个方面的综合能力培养,全面提升学生的IT职业胜任力。
6 |
7 | 在字学,你可以亲切地称呼其他人为“学友”,与“学友”们一同自在地学习,参加“字学”的活动及课程就能获得相应的学习卡,解锁不同权益。
8 |
9 | 未来,字学还将联合国内外多所顶级高校联合开发“IT职业胜任力课程体系”,构建胜任力培养模型,另外,我们还会举办多种线下实践活动,不仅有玩法多样的`技术训练营`、备受广大学生喜爱的`Byte Camp`,还有新奇有趣的`字节跳动OpenDay`等你线下来体验!
10 |
11 | 在字学,字在学习,跳动青春 。
12 |
13 | ## 学习卡
14 |
15 | 在字学里我们会使用学习卡来计算一个学生在字学版块的活跃程度。当用户积极签到并参加字学的各类活动、课程时,学习卡就会不断增加,累积到一定数值就可以兑换相应权益。
16 |
17 | 设置学习卡的目的是为了让主动学习的学生可以获得更多实践机会,学生可以在“我的主页”上看到自己的学习卡数量。
18 |
19 | ## 学习卡的价值
20 |
21 | 1. 学习卡代表着学生在字学的活跃程度。学习卡越多,证明自学能力越强。
22 | 2. 学习卡累积到不同量级,就可以解锁不同权限,包括但不限于获得字节周边礼品、以及字节活动、实践项目的直接参与资格等。
23 |
24 | ## 学习卡如何获得
25 |
26 | 1. 积极报名参加字学的活动,根据活动的难易程度增加不同的学习卡数量。
27 | 2. 主动学习字学的课程,每学习完一门课程就会获得一定数量的学习卡。
28 | 3. 本校学生参与字学的线下课程打卡,即可获得相应数量的学习卡。
29 | 4. 贡献优质文章且文章被推荐至首页,即可获得一定数量的学习卡。
30 |
31 | [原文地址](https://juejin.cn/book/6844733795329900551/section/6891866728775548943)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/12-前端|await-to-js 如何优雅的捕获 await 的错误.md:
--------------------------------------------------------------------------------
1 | # 前端|await-to-js 如何优雅的捕获 await 的错误
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. 如何学习调试源码
10 | 2. await-to-js 使用和原理
11 | 3. 可以多看测试用例
12 |
13 | ## 学习任务
14 |
15 | * 读的库: [github.com/scopsy/awai…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fscopsy%2Fawait-to-js "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fscopsy%2Fawait-to-js") 代码较少,简单易读,学完也能用上。
16 | * 官方文章:[How to write async await without try-catch blocks in Javascript](https://link.juejin.cn?target=https%3A%2F%2Fblog.grossman.io%2Fhow-to-write-async-await-without-try-catch-blocks-in-javascript%2F "https://link.juejin.cn?target=https%3A%2F%2Fblog.grossman.io%2Fhow-to-write-async-await-without-try-catch-blocks-in-javascript%2F")
17 | * 写笔记发布在掘金,再在本章节下评论放上提交笔记的链接。
18 |
19 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7172385155313565700)
--------------------------------------------------------------------------------
/.github/workflows/clear.yml:
--------------------------------------------------------------------------------
1 | name: claer
2 | on:
3 | schedule:
4 | - cron: '30 06 * * *'
5 | push:
6 | workflow_dispatch:
7 |
8 | jobs:
9 | clean:
10 | name: Clean
11 | runs-on: ubuntu-latest
12 | timeout-minutes: 60
13 | steps:
14 | - name: Checkout
15 | uses: actions/checkout@v2
16 | with:
17 | repository: Apocalypsor/Workflows-Cleaner
18 | - name: Set up Python
19 | uses: actions/setup-python@v2
20 | with:
21 | python-version: '3.9'
22 | - name: Install pipenv
23 | run: python -m pip install --upgrade pipenv wheel
24 | - name: Install dependencies
25 | run: |
26 | pipenv requirements > requirements.txt
27 | pip install -r requirements.txt
28 | - name: Clean
29 | env:
30 | GITHUB_REPO: ${{ github.repository }}
31 | GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
32 | EXPIRE_TIME: 12h
33 | run: python run.py
34 |
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/16-前端|p-limit 限制并发数.md:
--------------------------------------------------------------------------------
1 | # 前端|p-limit 限制并发数
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习任务
8 |
9 | * [github.com/sindresorhu…](https://link.juejin.cn/?target=https%3A%2F%2Fgithub.com%2Fsindresorhus%2Fp-limit "https://link.juejin.cn/?target=https%3A%2F%2Fgithub.com%2Fsindresorhus%2Fp-limit")
10 | * github1s: [github1s.com/sindresorhu…](https://link.juejin.cn/?target=https%3A%2F%2Fgithub1s.com%2Fsindresorhus%2Fp-limit%2Fblob%2Fmain%2Findex.js "https://link.juejin.cn/?target=https%3A%2F%2Fgithub1s.com%2Fsindresorhus%2Fp-limit%2Fblob%2Fmain%2Findex.js")
11 | * p-limit 源码行数不多, 68 行
12 | * 学习 p-limit 的使用场景
13 | * 可以克隆代码下来,关注测试用例,自己多调试
14 |
15 | ## 参考文章
16 |
17 | [Node.js 并发能力总结](https://link.juejin.cn/?target=https%3A%2F%2Fmp.weixin.qq.com%2Fs%2F6LsPMIHdIOw3KO6F2sgRXg "https://link.juejin.cn/?target=https%3A%2F%2Fmp.weixin.qq.com%2Fs%2F6LsPMIHdIOw3KO6F2sgRXg")
18 |
19 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7176118573508051000)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/29-前端|项目中常用的 .env 文件原理是什么?如何实现?.md:
--------------------------------------------------------------------------------
1 | # 前端|项目中常用的 .env 文件原理是什么?如何实现?
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. 学会 dotenv 原理和实现
10 | 2. 学会使用 fs模块 获取文件并解析
11 | 3. 等等
12 |
13 | ## 学习任务
14 |
15 | * 先阅读我的文章:[面试官:项目中常用的 .env 文件原理是什么?如何实现?](https://juejin.cn/post/7045057475845816357 "https://juejin.cn/post/7045057475845816357")
16 | * 源码地址:[github.com/motdotla/do…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmotdotla%2Fdotenv%2Fblob%2Fmaster%2Flib%2Fmain.js "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmotdotla%2Fdotenv%2Fblob%2Fmaster%2Flib%2Fmain.js")
17 | * github1s访问更方便 [github1s.com/motdotla/do…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmotdotla%2Fdotenv%2Fblob%2Fmaster%2Flib%2Fmain.js "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmotdotla%2Fdotenv%2Fblob%2Fmaster%2Flib%2Fmain.js")
18 | * 看文章,看源码,写笔记,交流讨论。
19 |
20 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7176615043516563460)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/5-前端|omit.js 剔除对象中的属性.md:
--------------------------------------------------------------------------------
1 | # 前端|omit.js 剔除对象中的属性
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ### 学习任务
8 |
9 | * omit.js 剔除对象中的属性
10 | * github仓库 [github.com/benjycui/om…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fbenjycui%2Fomit.js "https://github.com/benjycui/omit.js") 主要看这个。然后写笔记写文章记录。
11 | * npm [www.npmjs.com/package/omi…](https://link.juejin.cn?target=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fomit.js "https://www.npmjs.com/package/omit.js")
12 | * **这期比较简单,主要学会通过测试用例调试源码。** 可以多关注怎么发布npm包的、commonjs、esm、测试用例 、ts 等(也可以不关注)。
13 | * 建议克隆代码下来,关注测试用例,自己多通过测试用例调试,**自己调试过才能够学会,感受更深一些**。
14 |
15 | ### 参考资料
16 |
17 | * 关于如何调试看这篇:[新手向:前端程序员必学基本技能——调试JS代码](https://juejin.cn/post/7030584939020042254 "https://juejin.cn/post/7030584939020042254")
18 | * [若川说”可能是历史上最简单的一期omit.js”源码共读,但我学到了这些 - 掘金](https://juejin.cn/post/7119702439355220004 "https://juejin.cn/post/7119702439355220004")
19 |
20 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7169420227510272031)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/13-前端|promisify.md:
--------------------------------------------------------------------------------
1 | # 前端|promisify
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. Node 加载采用什么模块
10 | 2. 获取 git 仓库所有 tags 的原理
11 | 3. 学会调试看源码
12 | 4. 学会面试高频考点 promisify 的原理和实现
13 | 5. 等等
14 |
15 | ## 参考资料
16 |
17 | * [从22行有趣的源码库中,我学到了 callback promisify 化的 Node.js 源码实现](https://juejin.cn/post/7028731182216904740 "https://juejin.cn/post/7028731182216904740")
18 |
19 | * 克隆项目,按照我的文章要求,调试源码学习,最终提交笔记。
20 |
21 | * git clone [github.com/lxchuan12/r…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flxchuan12%2Fremote-git-tags-analysis.git "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flxchuan12%2Fremote-git-tags-analysis.git")
22 |
23 | * 写笔记发布在掘金,再在本章节下评论放上提交笔记的链接。
24 |
25 | 作者:若川
26 | 链接:[juejin.cn/post/708315…](https://juejin.cn/post/7083151186137251876 "https://juejin.cn/post/7083151186137251876")
27 | 来源:稀土掘金
28 | 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
29 |
30 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7172387644867870723)
--------------------------------------------------------------------------------
/docs/源码共读第一期|掘金会员专属活动/7-前端|vue2工具函数.md:
--------------------------------------------------------------------------------
1 | # 前端|vue2工具函数
2 |
3 | ### 本章任务提供
4 |
5 | [若川](https://juejin.cn/user/1415826704971918 "https://juejin.cn/user/1415826704971918")
6 |
7 | ## 学习目标
8 |
9 | 1. Vue2 源码 shared 模块中的几十个实用工具函数
10 | 2. 如何学习源码中优秀代码和思想,投入到自己的项目中
11 | 3. 如何学习 JavaScript 基础知识,会推荐很多学习资料
12 | 4. 我的一些经验分享
13 | 5. 等等
14 |
15 | ## 学习任务
16 |
17 | * **没使用过vue2的也可以学习**,有很多基础知识可以复习巩固。
18 | * 看文章:[初学者也能看懂的 Vue2 源码中那些实用的基础工具函数](https://juejin.cn/post/7024276020731592741 "https://juejin.cn/post/7024276020731592741")
19 | * 在线vscode 查看 [github1s.com/vuejs/vue/b…](https://link.juejin.cn?target=https%3A%2F%2Fgithub1s.com%2Fvuejs%2Fvue%2Fblob%2Fdev%2Fsrc%2Fshared%2Futil.js "https://link.juejin.cn?target=https%3A%2F%2Fgithub1s.com%2Fvuejs%2Fvue%2Fblob%2Fdev%2Fsrc%2Fshared%2Futil.js")
20 | * 打包后的工具函数 [github.com/vuejs/vue/b…](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fvuejs%2Fvue%2Fblob%2Fdev%2Fdist%2Fvue.js%23L14-L379 "https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fvuejs%2Fvue%2Fblob%2Fdev%2Fdist%2Fvue.js%23L14-L379")
21 |
22 | [原文地址](https://juejin.cn/book/7169108142868365349/section/7169477436118138888)
--------------------------------------------------------------------------------
/docs/.vitepress/theme/index.ts:
--------------------------------------------------------------------------------
1 | import { h } from 'vue'
2 | import { useData } from 'vitepress'
3 | import Theme from 'vitepress/theme'
4 | import 'vitepress-plugin-nprogress/lib/css/index.css'
5 | import vitepressLifeProgress from 'vitepress-plugin-life-progress'
6 | import 'vitepress-plugin-life-progress/lib/css/index.css'
7 | import vitepressBackToTop from 'vitepress-plugin-back-to-top'
8 | import 'vitepress-plugin-back-to-top/dist/style.css'
9 | import googleAnalytics from 'vitepress-plugin-google-analytics'
10 |
11 | export default {
12 | ...Theme,
13 | Layout: () => {
14 | const props: Record = {}
15 | // 获取 frontmatter
16 | const { frontmatter } = useData()
17 |
18 | /* 添加自定义 class */
19 | if (frontmatter.value?.layoutClass) {
20 | props.class = frontmatter.value.layoutClass
21 | }
22 |
23 | return h(Theme.Layout, props)
24 | },
25 | setup() {
26 | vitepressLifeProgress()
27 | },
28 | enhanceApp: (ctx) => {
29 | googleAnalytics({
30 | id: 'G-DTRHS9NHB5',
31 | }),
32 | vitepressBackToTop({
33 | threshold: 300,
34 | })
35 | },
36 | }
37 |
--------------------------------------------------------------------------------
/docs/稀土开发者大会2022/23-陈婧文:智能座舱 AI 推荐.md:
--------------------------------------------------------------------------------
1 | # 陈婧文:智能座舱 AI 推荐
2 |
3 | 
4 |
5 | 
6 |
7 | 
8 |
9 | 
10 |
11 | 
12 |
13 | 
14 |
15 | 
16 |
17 | [原文地址](https://juejin.cn/book/7127092198096502822/section/7127539272344666150)
--------------------------------------------------------------------------------
/src/spider/task/common.ts:
--------------------------------------------------------------------------------
1 | export const bookRegUrl = `https://api.juejin.cn/booklet_api/v1/booklet/get?aid=2608&uuid=` // 小册的接口
2 | export const bookThumbnailUrl = `https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/` // 小册的封面图
3 | export const bookSectionListSelector = '.section-list' // 小册的章节列表选择器
4 | export const bookSectionContentSelector = '.section-content' // 小册的章节内容选择器
5 | export const bookSectionTitleSelector = '.section-title' // 小册的章节标题选择器
6 | export const bookSectionAnchorSelector = '.section-anchor' // 小册的章节锚点选择器
7 | export const bookSectionAnchorActiveSelector = '.section-anchor-active' // 小册的章节锚点激活选择器
8 | export const anchorTagsSelector = `.title-line.text-line-2 > a` // 小册的锚点选择器
9 | export const waitElement = 'div[data-book-id=' // 等待元素
10 | export const mdContentSelector = '.markdown-body' // markdown内容选择器
11 | export const ignoreStyle = /