upload videos
This commit is contained in:
parent
f13b0f6150
commit
101e5fd846
@ -2,7 +2,7 @@
|
||||
```bash
|
||||
$ yarn install
|
||||
$ $Env:NODE_OPTIONS="--openssl-legacy-provider"
|
||||
$ yarn build
|
||||
$ yarn build; node make.js
|
||||
```
|
||||
|
||||
将 `./src/.vuepress/dist` 下文件夹上传到 `https://github.com/Digital-EDA/doc`
|
19
make.js
Normal file
19
make.js
Normal file
@ -0,0 +1,19 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
function replaceInFiles(dir, searchStr, replaceStr) {
|
||||
fs.readdirSync(dir).forEach(file => {
|
||||
let filePath = path.join(dir, file);
|
||||
let stats = fs.lstatSync(filePath);
|
||||
|
||||
if (stats.isDirectory()) {
|
||||
replaceInFiles(filePath, searchStr, replaceStr);
|
||||
} else if (filePath.endsWith('.html')) {
|
||||
let data = fs.readFileSync(filePath, 'utf8');
|
||||
let newData = data.replace(searchStr, replaceStr);
|
||||
fs.writeFileSync(filePath, newData);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
replaceInFiles('./src/.vuepress/dist', /\/videos\//g, '/doc/videos/');
|
@ -1,7 +1,7 @@
|
||||
const { description } = require('../../package')
|
||||
|
||||
module.exports = {
|
||||
base: './',
|
||||
base: '/doc/',
|
||||
title: 'Digital-IDE',
|
||||
description: description,
|
||||
head: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user