Skip to content

Commit

Permalink
add customized hexo-server
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaslanjaka committed Oct 23, 2024
1 parent fc1f9b7 commit 39ea409
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 14,984 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**/tmp/
*.log
.idea/
#**/yarn.lock
**/yarn.lock
**/package-lock.json
.nyc_output/
coverage/
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@
path = packages/hexo-cli
url = https://github.com/dimaslanjaka/hexo-cli.git
branch = monorepo
[submodule "packages/hexo-server"]
path = packages/hexo-server
url = https://github.com/dimaslanjaka/hexo-server.git
branch = private
15 changes: 8 additions & 7 deletions bin/sync-fork.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
yarn workspace hexo exec "git remote add upstream https://github.com/hexojs/hexo" > nul
yarn workspace hexo-front-matter exec "git remote add upstream https://github.com/hexojs/hexo-front-matter" > nul
yarn workspace warehouse exec "git remote add upstream https://github.com/hexojs/warehouse" > nul
yarn workspace hexo-asset-link exec "git remote add upstream https://github.com/liolok/hexo-asset-link" > nul
yarn workspace hexo-site exec "git remote add upstream https://github.com/hexojs/hexo-theme-unit-test" > nul
yarn workspace hexo-util exec "git remote add upstream https://github.com/hexojs/hexo-util" > nul
yarn workspace hexo-log exec "git remote add upstream https://github.com/hexojs/hexo-log" > nul
call yarn workspace hexo exec "git remote add upstream https://github.com/hexojs/hexo 2>NUL"
call yarn workspace hexo-front-matter exec "git remote add upstream https://github.com/hexojs/hexo-front-matter 2>NUL"
call yarn workspace warehouse exec "git remote add upstream https://github.com/hexojs/warehouse 2>NUL"
call yarn workspace hexo-asset-link exec "git remote add upstream https://github.com/liolok/hexo-asset-link 2>NUL"
call yarn workspace hexo-site exec "git remote add upstream https://github.com/hexojs/hexo-theme-unit-test 2>NUL"
call yarn workspace hexo-util exec "git remote add upstream https://github.com/hexojs/hexo-util 2>NUL"
call yarn workspace hexo-log exec "git remote add upstream https://github.com/hexojs/hexo-log 2>NUL"
call yarn workspace hexo-server exec "git remote add upstream https://github.com/hexojs/hexo-server 2>NUL"
32 changes: 8 additions & 24 deletions bin/sync-forks
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
#!/usr/bin/env bash

# make cygwin bin as priority
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH";

(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix

# absolute path working directory
basecwd=${PWD}
# base script directory
basedir=`dirname "$0"`
# absolute path script directory
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac


yarn workspace hexo exec "git remote add upstream https://github.com/hexojs/hexo"
yarn workspace hexo-front-matter exec "git remote add upstream https://github.com/hexojs/hexo-front-matter"
yarn workspace warehouse exec "git remote add upstream https://github.com/hexojs/warehouse"
yarn workspace hexo-asset-link exec "git remote add upstream https://github.com/liolok/hexo-asset-link"
yarn workspace hexo-site exec "git remote add upstream https://github.com/hexojs/hexo-theme-unit-test"
yarn workspace hexo-util exec "git remote add upstream https://github.com/hexojs/hexo-util"
yarn workspace hexo-log exec "git remote add upstream https://github.com/hexojs/hexo-log"
yarn workspace hexo exec "git remote add upstream https://github.com/hexojs/hexo 2>/dev/null"
yarn workspace hexo-front-matter exec "git remote add upstream https://github.com/hexojs/hexo-front-matter 2>/dev/null"
yarn workspace warehouse exec "git remote add upstream https://github.com/hexojs/warehouse 2>/dev/null"
yarn workspace hexo-asset-link exec "git remote add upstream https://github.com/liolok/hexo-asset-link 2>/dev/null"
yarn workspace hexo-site exec "git remote add upstream https://github.com/hexojs/hexo-theme-unit-test 2>/dev/null"
yarn workspace hexo-util exec "git remote add upstream https://github.com/hexojs/hexo-util 2>/dev/null"
yarn workspace hexo-log exec "git remote add upstream https://github.com/hexojs/hexo-log 2>/dev/null"
yarn workspace hexo-server exec "git remote add upstream https://github.com/hexojs/hexo-server 2>/dev/null"

# to re-fork see https://stackoverflow.com/a/29912546/6404439
2 changes: 1 addition & 1 deletion build-readme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import croSpawn from 'cross-spawn';
import * as croSpawn from 'cross-spawn';
import git from 'git-command-helper';
import minimist from 'minimist';
import nunjucks from 'nunjucks';
Expand Down
2 changes: 1 addition & 1 deletion build.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import croSpawn from 'cross-spawn';
import * as croSpawn from 'cross-spawn';
import { existsSync, mkdirSync, renameSync, rmSync } from 'fs';
import minimist from 'minimist';
import { dirname, join } from 'path';
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
"hexo": "workspace:^",
"warehouse": "workspace:^",
"hexo-front-matter": "workspace:^",
"hexo-asset-link": "workspace:^"
"hexo-asset-link": "workspace:^",
"@types/node": "^20"
},
"engines": {
"node": ">=14"
Expand Down
2 changes: 1 addition & 1 deletion packages/hexo
1 change: 1 addition & 0 deletions packages/hexo-server
Submodule hexo-server added at 5c3701
2 changes: 1 addition & 1 deletion packages/hexo-util
Binary file modified releases/hexo-util.tgz
Binary file not shown.
Binary file modified releases/hexo.tgz
Binary file not shown.
10 changes: 5 additions & 5 deletions releases/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ because of HexoJS doesnt accept my PR, i bundled my improved version of hexo.

| package name | commit |
| :--- | :--- |
| hexo | [3648b6b5](https://github.com/dimaslanjaka/hexo/commit/3648b6b5) [![Coverage Status](https://coveralls.io/repos/github/dimaslanjaka/hexo/badge.svg)](https://coveralls.io/github/dimaslanjaka/hexo) |
| hexo | [6d2e8668](https://github.com/dimaslanjaka/hexo/commit/6d2e8668) [![Coverage Status](https://coveralls.io/repos/github/dimaslanjaka/hexo/badge.svg)](https://coveralls.io/github/dimaslanjaka/hexo) |
| hexo-asset-link | [1957ca7](https://github.com/dimaslanjaka/hexo-asset-link/commit/1957ca7) |
| hexo-cli | [053e90f](https://github.com/dimaslanjaka/hexo-cli/commit/053e90f) |
| hexo-front-matter | [8dd6b4d](https://github.com/dimaslanjaka/hexo-front-matter/commit/8dd6b4d) |
Expand All @@ -18,7 +18,7 @@ Installation with command line interface

using `npm`
```bash
npm i hexo@https://github.com/dimaslanjaka/hexo/raw/076db66b/releases/hexo.tgz
npm i hexo@https://github.com/dimaslanjaka/hexo/raw/fc1f9b7b/releases/hexo.tgz
npm i hexo-asset-link@https://github.com/dimaslanjaka/hexo/raw/a6cfcf19/releases/hexo-asset-link.tgz
npm i hexo-cli@https://github.com/dimaslanjaka/hexo/raw/ff7502c9/releases/hexo-cli.tgz
npm i hexo-front-matter@https://github.com/dimaslanjaka/hexo/raw/a6cfcf19/releases/hexo-front-matter.tgz
Expand All @@ -29,7 +29,7 @@ npm i warehouse@https://github.com/dimaslanjaka/hexo/raw/a6cfcf19/releases/wareh

using `yarn`
```bash
yarn add hexo@https://github.com/dimaslanjaka/hexo/raw/076db66b/releases/hexo.tgz
yarn add hexo@https://github.com/dimaslanjaka/hexo/raw/fc1f9b7b/releases/hexo.tgz
yarn add hexo-asset-link@https://github.com/dimaslanjaka/hexo/raw/a6cfcf19/releases/hexo-asset-link.tgz
yarn add hexo-cli@https://github.com/dimaslanjaka/hexo/raw/ff7502c9/releases/hexo-cli.tgz
yarn add hexo-front-matter@https://github.com/dimaslanjaka/hexo/raw/a6cfcf19/releases/hexo-front-matter.tgz
Expand Down Expand Up @@ -72,7 +72,7 @@ package.json
{
"name": "your package name",
"resolutions": {
"hexo": "https://github.com/dimaslanjaka/hexo/raw/076db66b/releases/hexo.tgz",
"hexo": "https://github.com/dimaslanjaka/hexo/raw/fc1f9b7b/releases/hexo.tgz",
"hexo-asset-link": "https://github.com/dimaslanjaka/hexo/raw/a6cfcf19/releases/hexo-asset-link.tgz",
"hexo-cli": "https://github.com/dimaslanjaka/hexo/raw/ff7502c9/releases/hexo-cli.tgz",
"hexo-front-matter": "https://github.com/dimaslanjaka/hexo/raw/a6cfcf19/releases/hexo-front-matter.tgz",
Expand All @@ -94,7 +94,7 @@ package.json
{
"name": "your package name",
"overrides": {
"hexo": "https://github.com/dimaslanjaka/hexo/raw/076db66b/releases/hexo.tgz",
"hexo": "https://github.com/dimaslanjaka/hexo/raw/fc1f9b7b/releases/hexo.tgz",
"hexo-asset-link": "https://github.com/dimaslanjaka/hexo/raw/a6cfcf19/releases/hexo-asset-link.tgz",
"hexo-cli": "https://github.com/dimaslanjaka/hexo/raw/ff7502c9/releases/hexo-cli.tgz",
"hexo-front-matter": "https://github.com/dimaslanjaka/hexo/raw/a6cfcf19/releases/hexo-front-matter.tgz",
Expand Down
Loading

0 comments on commit 39ea409

Please sign in to comment.