Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 新增一些文档 #52

Merged
merged 6 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/CD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,8 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.pnpm-store
node_modules
key: ${{ runner.os }}-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-cache-
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}

### 打成压缩包
- name: Create Zip Package
Expand Down
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Release history

All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<!-- #region recent-beta -->

## 0.0.2-alpha.1 (2023-09-09)


### Features

* add docs ([11ee1d7](https://github.com/mmdapl/JavaScriptCollection/commit/11ee1d702a608c96a85153c8f6a8005c9abecf39))
* add workflow to deploy ([68c8044](https://github.com/mmdapl/JavaScriptCollection/commit/68c8044079c75b2b7926e633b1c06ca7ff57acc3))
* **algorithm:** 算法文档更新,侧边栏优化 ([80f08f6](https://github.com/mmdapl/JavaScriptCollection/commit/80f08f66dd98e3a511f6ac48f1f55bca8bbc6655))
* build-proxy image ([e460747](https://github.com/mmdapl/JavaScriptCollection/commit/e460747d5719490c659a6b015418a4daa7179d89))
* **ci:** add code-ci for eslint ([c8b91aa](https://github.com/mmdapl/JavaScriptCollection/commit/c8b91aa5fe3b50411f65d878c89193cb64f1a7bf))
* **ci:** update code-ci rule ([7106c25](https://github.com/mmdapl/JavaScriptCollection/commit/7106c2535c71aa8a60076e5eda698b09bcdeff61))
* **ci:** update run ([a9d6b0d](https://github.com/mmdapl/JavaScriptCollection/commit/a9d6b0d0740eda7d61fb2efe97f37131d54be7e5))
* **ci:** update secrets ([6c5b40f](https://github.com/mmdapl/JavaScriptCollection/commit/6c5b40f821bf402199c0d4ce353047ee0ab0aa63))
* ci回滚 ([7f9f9b4](https://github.com/mmdapl/JavaScriptCollection/commit/7f9f9b46bd0738bc2ecd2c676b6c073e2c1a9c3f))
* **ci:** 支持master分之部署 ([b60319c](https://github.com/mmdapl/JavaScriptCollection/commit/b60319cba8049d0488d4e32a60f1e3c9af1d9a45))
* ci流程优化,修复部分脚本异常 ([8e50abf](https://github.com/mmdapl/JavaScriptCollection/commit/8e50abfc505a36be3f31d5ac4e17dceb72a80981))
* delete ([27d568a](https://github.com/mmdapl/JavaScriptCollection/commit/27d568a25a664cde7ab591883693aca28bd7055a))
* delete grpc code ([d7ef3fc](https://github.com/mmdapl/JavaScriptCollection/commit/d7ef3fcf382efd7053ed4d821b78fe0735f11c4a))
* deploy esc ([0d90d30](https://github.com/mmdapl/JavaScriptCollection/commit/0d90d30268ca823ac2f4c5afedd25ef4add669da))
* docker-compose文档 ([7b2eb76](https://github.com/mmdapl/JavaScriptCollection/commit/7b2eb762f69089469c3e3ea74b5bcc4fd9b45d42))
* docker-image ([469ad47](https://github.com/mmdapl/JavaScriptCollection/commit/469ad473bad01b522c098a2b932aa6bbc835707b))
* docker相关文章 ([3852a8b](https://github.com/mmdapl/JavaScriptCollection/commit/3852a8b50cfe6d2047ab2551bf52e3927da9ca91))
* **docs:** update npm ([e37957a](https://github.com/mmdapl/JavaScriptCollection/commit/e37957a2c5f45ae8b1976f633afc91ba606acebc))
* **docs:** 新增文档那 ([8bc805e](https://github.com/mmdapl/JavaScriptCollection/commit/8bc805e68fea1f7b4e1fac31382fa34554ee55d7))
* es6相关改动 ([21a3ce9](https://github.com/mmdapl/JavaScriptCollection/commit/21a3ce97fb560d9f35693ec7bb7496827dd993bb))
* esc ci update ([3aec5cf](https://github.com/mmdapl/JavaScriptCollection/commit/3aec5cfd0cc40941bf1975d9204f72234b59ec22))
* esc description update ([8e07aa3](https://github.com/mmdapl/JavaScriptCollection/commit/8e07aa371d1366789360c0dd5fbcca47f3ae3c75))
* **eslint:** husky代码校验,eslint规则配置 ([9e2f9bf](https://github.com/mmdapl/JavaScriptCollection/commit/9e2f9bfeea919317eb7f4a4a8e9eb41474976aa8))
* just a job ([11bd00a](https://github.com/mmdapl/JavaScriptCollection/commit/11bd00a4ca3712fda698bdd22f83417ccabe50f7))
* reset git branch ([450875e](https://github.com/mmdapl/JavaScriptCollection/commit/450875ef3ee9a626bf8a0617383cd5fc401a2395))
* **scripts:** 脚本优化,package.json调整 ([accd1d1](https://github.com/mmdapl/JavaScriptCollection/commit/accd1d19f0a0e57176557babfb6e416d21a3949d))
* **scripts:** 脚本优化,项目结构调整 ([d0de025](https://github.com/mmdapl/JavaScriptCollection/commit/d0de025c5e41540b1ef00e7bb6230324ee596dc9))
* shell相关代码初始化 ([3c0e1d6](https://github.com/mmdapl/JavaScriptCollection/commit/3c0e1d697c7a99d155e1b369da10b2d8d1850caf))
* ssh-master ([6e56d68](https://github.com/mmdapl/JavaScriptCollection/commit/6e56d68b5be1e8ac912bf047cb8a7fefc105be2d))
* update ([871d031](https://github.com/mmdapl/JavaScriptCollection/commit/871d0311a78bcf3e24f9fbe436f88318ccc72f0c))
* update /service_env/ ([0434970](https://github.com/mmdapl/JavaScriptCollection/commit/0434970eb89836cd3a0db685ff738a324f67326b))
* update ci ([f01ca69](https://github.com/mmdapl/JavaScriptCollection/commit/f01ca6903e5bf992598f62a636269489b0bfee95))
* update ci rule ([177c2f4](https://github.com/mmdapl/JavaScriptCollection/commit/177c2f4e8077debe50809e00c162a433b13a81ab))
* update ci yaml ([e7e33f5](https://github.com/mmdapl/JavaScriptCollection/commit/e7e33f56ad20820ced703567690c84bc4a9070c6))
* update config ([f7eaeac](https://github.com/mmdapl/JavaScriptCollection/commit/f7eaeac28bada71001dd884023e8a3dad7e0ff83))
* update docs ([510f213](https://github.com/mmdapl/JavaScriptCollection/commit/510f21308a12c653706c2409f4f251bc7dff0bc1))
* update job sort ([46ba934](https://github.com/mmdapl/JavaScriptCollection/commit/46ba934711958d8d300bd8c780fb68de22a09df5))
* update logo ([435550c](https://github.com/mmdapl/JavaScriptCollection/commit/435550cd03ab34ac8da708d3fd5213573fa1006f))
* update todo list ([c9b8b8e](https://github.com/mmdapl/JavaScriptCollection/commit/c9b8b8e341f3257e29c4b44239bd2b3a19960320))
* update-desc ([185af9d](https://github.com/mmdapl/JavaScriptCollection/commit/185af9db8762d9cd394bad944a66e6a2d672afee))
* **vercel:** vercel 统计相关配置 ([fe5f02e](https://github.com/mmdapl/JavaScriptCollection/commit/fe5f02ed5b921b26105233653ef66d9eef932430))
* 优化js代码,新增链表相关刷题文档 ([d99044f](https://github.com/mmdapl/JavaScriptCollection/commit/d99044f1ffc643b14b8c41cc63f6e9bab105b71b))
* 优化导航栏配置 ([3776e49](https://github.com/mmdapl/JavaScriptCollection/commit/3776e49ffb1f2c1813c5f96e552649925183444c))
* 侧边栏配置修复 ([2047269](https://github.com/mmdapl/JavaScriptCollection/commit/204726974bd717664c67c1f08ba848f4b2bde897))
* 侧边栏配置更新 ([88b70aa](https://github.com/mmdapl/JavaScriptCollection/commit/88b70aad92b365b2bce92062b867b6edb1e377cc))
* 修复 netlify平台部署 ([0cf2830](https://github.com/mmdapl/JavaScriptCollection/commit/0cf2830fe4d00de0733eff89a970886d29475d70))
* 修改 基础配置更新 ([c721ab1](https://github.com/mmdapl/JavaScriptCollection/commit/c721ab11f36fcd4af7dd02409169f0639fff3ba6))
* 修改Dockerfile,新增本地快速构建脚本 ([1a4d3d6](https://github.com/mmdapl/JavaScriptCollection/commit/1a4d3d697e3cea1fbfd2e9bf7f2e48d5a8e58667))
* 修改eslint格式化 ([46c026e](https://github.com/mmdapl/JavaScriptCollection/commit/46c026e86246b39d8b6238260d0f96e2d65e9f3a))
* 修改hope主题配置,新增一些文档优化 ([c564f9f](https://github.com/mmdapl/JavaScriptCollection/commit/c564f9f8443eb47498ac2efe076a2c822fb0384a))
* 修改一些配置,升级依赖 ([8e4fbb6](https://github.com/mmdapl/JavaScriptCollection/commit/8e4fbb655cbc6b8f424cc3b6a81d0465e30c4a12))
* 修改主题配置 ([1922a29](https://github.com/mmdapl/JavaScriptCollection/commit/1922a29e9358373b92667465474dce77654a854d))
* 修改侧边栏结构,优化镜像构建脚本 ([7839f95](https://github.com/mmdapl/JavaScriptCollection/commit/7839f95e11e93f8d3c48a7c2a33919d2d1683000))
* 修改导航栏结构,添加文档 ([9bbe9ae](https://github.com/mmdapl/JavaScriptCollection/commit/9bbe9aed4b9885f927f4df8c390570e1fc17b3fb))
* 修改部署脚本及配置 ([5474059](https://github.com/mmdapl/JavaScriptCollection/commit/54740596dfa0e7391c9a464e9884138425ce6aab))
* 修改配置 ([08ae5de](https://github.com/mmdapl/JavaScriptCollection/commit/08ae5debabf2a6ca4d3a37fe1ff6645b4e3e6ab0))
* 修改镜像版本,删除无用脚本 ([2054593](https://github.com/mmdapl/JavaScriptCollection/commit/2054593e3031892ad5b99445622c4bc1ec592967))
* 升级eslint版本,修改侧边栏 ([3dca375](https://github.com/mmdapl/JavaScriptCollection/commit/3dca3756c14b238320cee914ac789facbd9881dc))
* 忽略文件配置修改 ([3251a00](https://github.com/mmdapl/JavaScriptCollection/commit/3251a0093db0631bbc7c8859ac7027d914e588b6))
* 支持next自动部署ci ([3fbc033](https://github.com/mmdapl/JavaScriptCollection/commit/3fbc033022098099fd6d24757d097d979d9e5fb8))
* 支持中文配置,优化访问链接 ([59d6c21](https://github.com/mmdapl/JavaScriptCollection/commit/59d6c21308f0b00ea834836f5f6448b73172e71d))
* 文档更新 ([6ad7e82](https://github.com/mmdapl/JavaScriptCollection/commit/6ad7e82d56083d8f22380816ef13f1b5a9f79f64))
* 新增grpc相关文档 ([9412040](https://github.com/mmdapl/JavaScriptCollection/commit/9412040a6c50f2918fedb784e364d907bf646057))
* 新增linux基础指令文档 ([88a9f2c](https://github.com/mmdapl/JavaScriptCollection/commit/88a9f2c0ec40e957e8818c96a8c75985de73369c))
* 新增PROXY_DOMAIN环境变量配置,支持base转化 ([5ea2e5d](https://github.com/mmdapl/JavaScriptCollection/commit/5ea2e5d3537e3ded6a57aff83bdae985316c7f3a))
* 新增redis主从集群文档 ([feebfbe](https://github.com/mmdapl/JavaScriptCollection/commit/feebfbea121c2bbacdaef751178a042cbbb1f6a5))
* 新增redis相关文章 ([f929360](https://github.com/mmdapl/JavaScriptCollection/commit/f9293602067827a5e02997133202696389f791ac))
* 新增一些文档 ([95f8f86](https://github.com/mmdapl/JavaScriptCollection/commit/95f8f862bb563c18a063f6306ad96326c531b33d))
* 新增一些文档,优化配置 ([1c24993](https://github.com/mmdapl/JavaScriptCollection/commit/1c24993ec78cd87abc927317af31fe0064b262c0))
* 新增文档,优化navbar导航栏 ([983b783](https://github.com/mmdapl/JavaScriptCollection/commit/983b7839e2be4588b1ac680a0f2692d1f7343b88))
* 新增算法文档 ([fc602dd](https://github.com/mmdapl/JavaScriptCollection/commit/fc602ddb27847a43e2668a40e5e516df8674819a))
* 新增算法源码 ([e4c74db](https://github.com/mmdapl/JavaScriptCollection/commit/e4c74dba01bfea775d59d8002897bc7db108f0f3))
* 更新doc ([bb380b6](https://github.com/mmdapl/JavaScriptCollection/commit/bb380b6b488ba2e9ba0a34a3c1ba70c54213bfda))
* 更新pnpm版本 ([ed17b5f](https://github.com/mmdapl/JavaScriptCollection/commit/ed17b5f70d56014725fdd9e00fdc33e5eca56e8f))
* 更新script ([dded339](https://github.com/mmdapl/JavaScriptCollection/commit/dded339815598a06c794c3f6997e1f6acf72082e))
* 更新文档,新增在线浏览地址 ([194b22e](https://github.com/mmdapl/JavaScriptCollection/commit/194b22e44e26777262c0f6beb601ccdc00e9b168))
* 更新流程依赖 ([81df3aa](https://github.com/mmdapl/JavaScriptCollection/commit/81df3aa28c1ab703532a1ef008e916632b3b820e))
* 更新版本号配置 ([38f214a](https://github.com/mmdapl/JavaScriptCollection/commit/38f214aef038d6c4c94c569350d055c7bfc22364))
* 更新配置 ([62a399d](https://github.com/mmdapl/JavaScriptCollection/commit/62a399dc651d1cf37749575afe25ab2cb18a38b2))
* 版本、侧边栏更新 ([50da068](https://github.com/mmdapl/JavaScriptCollection/commit/50da06817a2d2358bf118f9f48ac6fe36c6fcc01))
* 还原config配置,修复目录问题 ([9499210](https://github.com/mmdapl/JavaScriptCollection/commit/949921082b793d1aa227b585651d9469184c502b))
* 配置cz,优化commit hooks ([0d142c8](https://github.com/mmdapl/JavaScriptCollection/commit/0d142c8fc01f7a01aa3bd5f2d7271788113a31e9))
* 配置更新 ([1de6068](https://github.com/mmdapl/JavaScriptCollection/commit/1de6068d886c9f26d43ce95548b96105474d836f))
* 配置采用ts语法,新增代码文件引入 ([43aeaff](https://github.com/mmdapl/JavaScriptCollection/commit/43aeaff341a6c09acea4292c7d3deecd8613aabb))
* 首页导航栏内容优化 ([0df1d96](https://github.com/mmdapl/JavaScriptCollection/commit/0df1d968b099f467e6e83f30b04eb4d717b99978))


### Bug Fixes

* esc deploy ([0c5c330](https://github.com/mmdapl/JavaScriptCollection/commit/0c5c3300583056f344e18382d54d4ee143978155))
* 修复 格式 ([837e05d](https://github.com/mmdapl/JavaScriptCollection/commit/837e05d42c333044bee413e4f15f2e49406c08d3))
* 修复build指令异常 ([d009770](https://github.com/mmdapl/JavaScriptCollection/commit/d0097705dd534716c210ef0c531873ee438c469d))
* 配置优化 ([a085309](https://github.com/mmdapl/JavaScriptCollection/commit/a0853096156e2eb890ad3187edfa0fae5f599e00))


### Performance Improvements

* **pnpm:** 升级模块 ([b283402](https://github.com/mmdapl/JavaScriptCollection/commit/b2834025a4de2162d25f7694be75585dd4244ef5))
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# CONTAINER_BUILD: 采用容器构建
#
# 注意:vite构建需要支持node14以上,安装node16较为稳妥

FROM registry.cn-hangzhou.aliyuncs.com/142vip/node:16.20.2-alpine AS build_base

ARG CONTAINER_BUILD
Expand All @@ -20,7 +21,6 @@ RUN if [ "$CONTAINER_BUILD" = "true" ]; then \
npm i pnpm@7 -g && pnpm i -D && pnpm build; \
fi;


FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:1.23.0-alpine
ARG APP_VERSION
LABEL version=$APP_VERSION description="JavaScriptCollection文档合集、博客"
Expand Down
5 changes: 0 additions & 5 deletions code/algorithm/find.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
*
* @param target
* @param array
*/
function Find(target, array) {
if (!array) {
return false
Expand Down
6 changes: 0 additions & 6 deletions code/algorithm/leftRotateString.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/**
* @param str
* @param n
* @returns {*}
* @constructor
*/
function LeftRotateString(str, n) {
if (!str) {
return str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
*/
function add() {
const args = Array.prototype.slice.call(arguments)

const _add = function() {
console.log('add', arguments)
args.push(...arguments)

// 返回函数
return _add
}

// 对参数数组做求和处理

_add.toString = function() {
// 设置sum的起始值为0
return args.reduce((sum, item) => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/**
* 移除数组 arr 中的所有值与 item 相等的元素,直接在给定的 arr 数组上进行操作,并将结果返回
* @param arr
* @param item
* @returns {*}
* 移除数组 arr 中的所有值与 item 相等的元素
* - 直接在给定的 arr 数组上进行操作,并将结果返回
*/
function removeWithoutCopy(arr, item) {
// const result= arr.filter(value=>value!==item)
// // 输出
// return result;

// 每次都和arr中的首个元素去比较
const len = arr.length
for (let index = 0; index < len; index++) {
Expand Down
23 changes: 0 additions & 23 deletions code/algorithm/剑指/JZ20_stack.js

This file was deleted.

14 changes: 0 additions & 14 deletions code/algorithm/剑指/JZ27_Permutation.js

This file was deleted.

47 changes: 0 additions & 47 deletions code/algorithm/剑指/JZ30_FindGreatestSumOfSubArray.js

This file was deleted.

22 changes: 0 additions & 22 deletions code/algorithm/剑指/JZ51_multiply.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
*
* @param array int整型一维数组
* @return int整型一维数组
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/**
*
* @param str
*/
function Permutation(str) {
const result = []
const i = 0
Expand Down
5 changes: 0 additions & 5 deletions code/algorithm/剑指/二分查找/getNumberOfK.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ function GetNumberOfK(data, k) {
return left === -1 && right === -1 ? 0 : right - left + 1
}

/**
*
* @param data
* @param target
*/
function rightBinarySearch(data, target) {
if (!data.length) {
return -1
Expand Down
1 change: 0 additions & 1 deletion code/algorithm/剑指/位运算/findNumsAppearOnce.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ function findNumsAppearOnceOne(array) {
*/
function findNumsAppearOnceTwo(array) {
const resMap = new Map()

// 统计
for (const value of array) {
if (resMap.has(value)) {
Expand Down
12 changes: 5 additions & 7 deletions code/algorithm/剑指/其他相关/add.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/**
* 【简单】不用加减乘除做加法
*/


/**
* 利用自增
* - 利用自增
* @param num1
* @param num2
*/
Expand All @@ -28,7 +24,8 @@ function addOne(num1, num2) {
}

/**
* 利用位运算【递归】
* 【简单】不用加减乘除做加法
* - 利用位运算【递归】
* @param num1
* @param num2
*/
Expand All @@ -38,7 +35,8 @@ function addTwo(num1, num2) {


/**
* 利用位运算【循环】
* 【简单】不用加减乘除做加法
* - 利用位运算【循环】
* @param num1
* @param num2
* @returns {number}
Expand Down
3 changes: 1 addition & 2 deletions code/algorithm/剑指/其他相关/isContinuous.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ function IsContinuous(numbers) {
// 判断每个的间隔
for (let index = 0; index < numbers.length - 1; index++) {
if (numbers[index] !== 0 && numbers[index + 1] - numbers[index] > 1) {
// console.log(count,(numbers[index+1]-numbers[index]))
// console.log(count, (numbers[index + 1] - numbers[index]))
count -= (numbers[index + 1] - numbers[index] - 1)
// console.log(count)
}
}

Expand Down
Loading