mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Tools: Fixed doc update scripts
This commit is contained in:
parent
53c432ce12
commit
9af8720199
@ -8,6 +8,7 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"buildApiDoc": "npm start --prefix=packages/app-cli -- apidoc ../../readme/api/references/rest_api.md",
|
||||
"buildDoc": "./packages/tools/build-all.sh",
|
||||
"buildPluginDoc": "typedoc --name 'Joplin Plugin API Documentation' --mode file -theme './Assets/PluginDocTheme/' --readme './Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out docs/api/references/plugin_api packages/lib/services/plugins/api/",
|
||||
"buildWebsite": "npm run buildApiDoc && node ./packages/tools/build-website.js && npm run buildPluginDoc",
|
||||
"clean": "lerna clean -y && lerna run clean",
|
||||
|
@ -3,13 +3,7 @@ set -e
|
||||
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# echo "---------------------------------------------------"
|
||||
# echo "Rebuild API doc..."
|
||||
# echo "---------------------------------------------------"
|
||||
# cd "$ROOT_DIR/../packages/app-cli"
|
||||
# API_DOC="$(npm run --silent start -- apidoc)"
|
||||
# echo "$API_DOC" > "$ROOT_DIR/../readme/api/references/rest_api.md"
|
||||
# cd "$ROOT_DIR"
|
||||
git pull
|
||||
|
||||
echo "---------------------------------------------------"
|
||||
echo "$ROOT_DIR/update-readme-download.js..."
|
||||
|
@ -5,7 +5,7 @@ const fs = require('fs-extra');
|
||||
const { dirname } = require('@joplinapp/lib/path-utils');
|
||||
const markdownUtils = require('@joplinapp/lib/markdownUtils').default;
|
||||
|
||||
const rootDir = dirname(__dirname);
|
||||
const rootDir = dirname(dirname(__dirname));
|
||||
|
||||
function endsWith(str, suffix) {
|
||||
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
||||
|
@ -3,7 +3,7 @@ const dirname = require('path').dirname;
|
||||
const { fileExtension, basename } = require('@joplinapp/lib/path-utils');
|
||||
const markdownUtils = require('@joplinapp/lib/markdownUtils').default;
|
||||
|
||||
const rootDir = dirname(__dirname);
|
||||
const rootDir = dirname(dirname(__dirname));
|
||||
const welcomeDir = `${rootDir}/readme/welcome`;
|
||||
|
||||
const createdDate = new Date('2018-06-22T12:00:00Z');
|
||||
@ -141,7 +141,7 @@ async function main() {
|
||||
const content = { notes: notes, folders: folders, tags: tags, timestamp: createdDate.getTime() };
|
||||
const jsonContent = JSON.stringify(content, null, 4);
|
||||
const jsContent = `module.exports = ${jsonContent}`;
|
||||
fs.writeFileSync(`${rootDir}/packages/app-mobile/lib/welcomeAssets.js`, jsContent, { encoding: 'utf8' });
|
||||
fs.writeFileSync(`${rootDir}/packages/lib/welcomeAssets.js`, jsContent, { encoding: 'utf8' });
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
|
@ -5,7 +5,7 @@ const request = require('request');
|
||||
|
||||
const { fileExtension } = require('@joplinapp/lib/path-utils');
|
||||
const url = 'https://api.github.com/repos/laurent22/joplin/releases/latest';
|
||||
const readmePath = `${__dirname}/../README.md`;
|
||||
const readmePath = `${__dirname}/../../README.md`;
|
||||
|
||||
async function msleep(ms) {
|
||||
return new Promise((resolve) => {
|
||||
|
Loading…
Reference in New Issue
Block a user