mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-27 10:56:16 -04:00
Removed deprecated js files.
This commit is contained in:
parent
7f05e2b399
commit
6ed711a4d8
12 changed files with 69 additions and 21088 deletions
63
bin/make_docs.ts
Normal file
63
bin/make_docs.ts
Normal file
|
@ -0,0 +1,63 @@
|
|||
import {exec} from 'child_process'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
import pjson from '../src/package.json'
|
||||
|
||||
const VERSION=pjson.version
|
||||
console.log(`Building docs for version ${VERSION}`)
|
||||
|
||||
const createDirIfNotExists = (dir: fs.PathLike) => {
|
||||
if (!fs.existsSync(dir)){
|
||||
fs.mkdirSync(dir)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function copyFolderSync(from: fs.PathLike, to: fs.PathLike) {
|
||||
if(fs.existsSync(to)){
|
||||
const stat = fs.lstatSync(to)
|
||||
if (stat.isDirectory()){
|
||||
fs.rmSync(to, { recursive: true })
|
||||
}
|
||||
else{
|
||||
fs.rmSync(to)
|
||||
}
|
||||
}
|
||||
fs.mkdirSync(to);
|
||||
fs.readdirSync(from).forEach(element => {
|
||||
if (fs.lstatSync(path.join(<string>from, element)).isFile()) {
|
||||
if (typeof from === "string") {
|
||||
if (typeof to === "string") {
|
||||
fs.copyFileSync(path.join(from, element), path.join(to, element))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (typeof from === "string") {
|
||||
if (typeof to === "string") {
|
||||
copyFolderSync(path.join(from, element), path.join(to, element))
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
exec('asciidoctor -v', (err,stdout)=>{
|
||||
if (err){
|
||||
console.log('Please install asciidoctor')
|
||||
console.log('https://asciidoctor.org/docs/install-toolchain/')
|
||||
process.exit(1)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
createDirIfNotExists('../out')
|
||||
createDirIfNotExists('../out/doc')
|
||||
createDirIfNotExists('../out/doc/api')
|
||||
|
||||
|
||||
|
||||
exec(`asciidoctor -D ../out/doc ../doc/index.adoc */**.adoc -a VERSION=${VERSION}`)
|
||||
exec(`asciidoctor -D ../out/doc/api ../doc/api/*.adoc -a VERSION=${VERSION}`)
|
||||
|
||||
copyFolderSync('../doc/public/', '../out/doc/')
|
|
@ -20,6 +20,7 @@
|
|||
"typescript": "^5.5.4"
|
||||
},
|
||||
"scripts": {
|
||||
"makeDocs": "node --import tsx make_docs.ts",
|
||||
"checkPad": "node --import tsx checkPad.ts",
|
||||
"checkAllPads": "node --import tsx checkAllPads.ts",
|
||||
"createUserSession": "node --import tsx createUserSession.ts",
|
||||
|
|
|
@ -197,7 +197,7 @@ try {
|
|||
|
||||
try {
|
||||
console.log('Building documentation...');
|
||||
run('node ./make_docs.js');
|
||||
run('pnpm run makeDocs');
|
||||
console.log('Updating ether.github.com master branch...');
|
||||
run('git pull --ff-only', {cwd: '../ether.github.com/'});
|
||||
console.log('Committing documentation...');
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
||||
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
||||
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
||||
// "resolveJsonModule": true, /* Enable importing .json files. */
|
||||
"resolveJsonModule": true, /* Enable importing .json files. */
|
||||
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
||||
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue