-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
216 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.DS_Store | ||
node_modules | ||
*.log | ||
.cache |
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { docs } from "./docs"; | ||
|
||
export const DOCS_GROUP = Object.keys(docs); | ||
export const FE_GROUP = [ | ||
"HTML", | ||
"CSS", | ||
"JavaScript", | ||
"Browser", | ||
"Vue", | ||
"React", | ||
"Plugin", | ||
"Patterns", | ||
"Linux", | ||
"LeetCode", | ||
]; | ||
|
File renamed without changes.
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import path from "node:path"; | ||
import { exec as aliasExec } from "node:child_process"; | ||
import { promisify } from "node:util"; | ||
import { DOCS_GROUP } from "./constant"; | ||
|
||
const exec = promisify(aliasExec); | ||
|
||
(async () => { | ||
console.log("Syncing Blog..."); | ||
for (const group of DOCS_GROUP) { | ||
console.log("Processing", group); | ||
const from = path.resolve(__dirname, `../${group}`); | ||
const to = path.resolve(__dirname, `../../Blog/`); | ||
await exec(`cp -r ${from} ${to}`); | ||
} | ||
})(); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import path from "node:path"; | ||
import { exec as aliasExec } from "node:child_process"; | ||
import { promisify } from "node:util"; | ||
import { DOCS_GROUP } from "./constant"; | ||
|
||
const exec = promisify(aliasExec); | ||
|
||
(async () => { | ||
console.log("Syncing SSG..."); | ||
for (const group of DOCS_GROUP) { | ||
console.log("Processing", group); | ||
const from = path.resolve(__dirname, `../${group}`); | ||
const to = path.resolve(__dirname, `../../Blog-SSG/docs/zh-cn`); | ||
await exec(`cp -r ${from} ${to}`); | ||
} | ||
console.log("Processing", "I18N"); | ||
const from = path.resolve(__dirname, `../i18n/`); | ||
const to = path.resolve(__dirname, `../../Blog-SSG/docs/en-us`); | ||
await exec(`cp -r ${from}/* ${to}`); | ||
})(); |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"scripts": { | ||
"sync:blog": "ts-node ./.scripts/sync-blog.ts", | ||
"sync:ssg": "ts-node ./.scripts/sync-ssg.ts", | ||
"sync": "npm run sync:blog && npm run sync:ssg" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^22.9.0", | ||
"ts-node": "10.9.1" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"esModuleInterop": true | ||
}, | ||
"include": ["./.scripts/*"] | ||
} |