1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Chore: Rename instances of yarn run to just yarn

This commit is contained in:
Laurent Cozic
2024-01-26 20:19:28 +00:00
parent 999baf4b3d
commit c94ec4e064
35 changed files with 73 additions and 73 deletions

View File

@ -107,7 +107,7 @@ if [ "$RUN_TESTS" == "1" ]; then
# #
# https://stackoverflow.com/questions/38558989 # https://stackoverflow.com/questions/38558989
export NODE_OPTIONS="--max-old-space-size=32768" export NODE_OPTIONS="--max-old-space-size=32768"
yarn run test-ci yarn test-ci
testResult=$? testResult=$?
if [ $testResult -ne 0 ]; then if [ $testResult -ne 0 ]; then
exit $testResult exit $testResult
@ -122,13 +122,13 @@ fi
if [ "$RUN_TESTS" == "1" ]; then if [ "$RUN_TESTS" == "1" ]; then
echo "Step: Running linter..." echo "Step: Running linter..."
yarn run linter-ci ./ yarn linter-ci ./
testResult=$? testResult=$?
if [ $testResult -ne 0 ]; then if [ $testResult -ne 0 ]; then
exit $testResult exit $testResult
fi fi
yarn run packageJsonLint yarn packageJsonLint
testResult=$? testResult=$?
if [ $testResult -ne 0 ]; then if [ $testResult -ne 0 ]; then
exit $testResult exit $testResult
@ -175,7 +175,7 @@ fi
# ============================================================================= # =============================================================================
# Check .gitignore and .eslintignore files - they should be updated when # Check .gitignore and .eslintignore files - they should be updated when
# new TypeScript files are added by running `yarn run updateIgnored`. # new TypeScript files are added by running `yarn updateIgnored`.
# See coding_style.md # See coding_style.md
# ============================================================================= # =============================================================================
@ -200,7 +200,7 @@ if [ "$RUN_TESTS" == "1" ]; then
mkdir -p ../joplin-website/docs mkdir -p ../joplin-website/docs
ll ../joplin-website/docs/api/references/plugin_api ll ../joplin-website/docs/api/references/plugin_api
SKIP_SPONSOR_PROCESSING=1 yarn run buildWebsite SKIP_SPONSOR_PROCESSING=1 yarn buildWebsite
testResult=$? testResult=$?
if [ $testResult -ne 0 ]; then if [ $testResult -ne 0 ]; then
exit $testResult exit $testResult
@ -253,14 +253,14 @@ if [ "$IS_DESKTOP_RELEASE" == "1" ]; then
# "python" and seems to no longer respect the PYTHON_PATH environment variable. # "python" and seems to no longer respect the PYTHON_PATH environment variable.
# We work around this by aliasing python. # We work around this by aliasing python.
alias python=$(which python3) alias python=$(which python3)
USE_HARD_LINKS=false yarn run dist USE_HARD_LINKS=false yarn dist
else else
USE_HARD_LINKS=false yarn run dist USE_HARD_LINKS=false yarn dist
fi fi
elif [[ $IS_LINUX = 1 ]] && [ "$IS_SERVER_RELEASE" == "1" ]; then elif [[ $IS_LINUX = 1 ]] && [ "$IS_SERVER_RELEASE" == "1" ]; then
echo "Step: Building Docker Image..." echo "Step: Building Docker Image..."
cd "$ROOT_DIR" cd "$ROOT_DIR"
yarn run buildServerDocker --tag-name $GIT_TAG_NAME --push-images --repository $SERVER_REPOSITORY yarn buildServerDocker --tag-name $GIT_TAG_NAME --push-images --repository $SERVER_REPOSITORY
else else
echo "Step: Building but *not* publishing desktop application..." echo "Step: Building but *not* publishing desktop application..."
@ -274,8 +274,8 @@ else
export CSC_IDENTITY_AUTO_DISCOVERY=false export CSC_IDENTITY_AUTO_DISCOVERY=false
npm pkg set 'build.mac.identity'=null --json npm pkg set 'build.mac.identity'=null --json
USE_HARD_LINKS=false yarn run dist --publish=never USE_HARD_LINKS=false yarn dist --publish=never
else else
USE_HARD_LINKS=false yarn run dist --publish=never USE_HARD_LINKS=false yarn dist --publish=never
fi fi
fi fi

View File

@ -67,7 +67,7 @@ jobs:
if [[ $GIT_TAG_NAME = v* ]]; then if [[ $GIT_TAG_NAME = v* ]]; then
echo "Building and publishing desktop application..." echo "Building and publishing desktop application..."
PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn run dist --mac --arm64 PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn dist --mac --arm64
yarn renameReleaseAssets --repo="$GH_REPO" --tag="$GIT_TAG_NAME" --token="$GITHUB_TOKEN" yarn renameReleaseAssets --repo="$GH_REPO" --tag="$GIT_TAG_NAME" --token="$GITHUB_TOKEN"
else else
@ -80,5 +80,5 @@ jobs:
export CSC_IDENTITY_AUTO_DISCOVERY=false export CSC_IDENTITY_AUTO_DISCOVERY=false
npm pkg set 'build.mac.identity'=null --json npm pkg set 'build.mac.identity'=null --json
PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn run dist --mac --arm64 --publish=never PYTHON_PATH=$(which python) USE_HARD_LINKS=false yarn dist --mac --arm64 --publish=never
fi fi

View File

@ -141,7 +141,7 @@ jobs:
# To ensure that the operations stop on failure, all commands # To ensure that the operations stop on failure, all commands
# should be on one line with "&&" in between. # should be on one line with "&&" in between.
run: | run: |
yarn install && cd packages/app-desktop && yarn run dist yarn install && cd packages/app-desktop && yarn dist
# Build and package the Windows app, without publishing it, just to # Build and package the Windows app, without publishing it, just to
# verify that the build process hasn't been broken. # verify that the build process hasn't been broken.
@ -153,7 +153,7 @@ jobs:
SERVER_REPOSITORY: joplin/server SERVER_REPOSITORY: joplin/server
SERVER_TAG_PREFIX: server SERVER_TAG_PREFIX: server
run: | run: |
yarn install && cd packages/app-desktop && yarn run dist --publish=never yarn install && cd packages/app-desktop && yarn dist --publish=never
ServerDockerImage: ServerDockerImage:
needs: pre_job needs: pre_job
@ -197,7 +197,7 @@ jobs:
BUILD_SEQUENCIAL: 1 BUILD_SEQUENCIAL: 1
run: | run: |
yarn install yarn install
yarn run buildServerDocker --tag-name server-v0.0.0 --repository joplin/server yarn buildServerDocker --tag-name server-v0.0.0 --repository joplin/server
# Basic test to ensure that the created build is valid. It should exit with # Basic test to ensure that the created build is valid. It should exit with
# code 0 if it works. # code 0 if it works.

View File

@ -1,5 +1,5 @@
# For development this compose file starts the database only. The app can then # For development this compose file starts the database only. The app can then
# be started using `yarn run start-dev`, which is useful for development, because # be started using `yarn start-dev`, which is useful for development, because
# it means the app Docker file doesn't have to be rebuilt on each change. # it means the app Docker file doesn't have to be rebuilt on each change.
version: '3' version: '3'

View File

@ -11,9 +11,9 @@ module.exports = {
// //
// '**/*.ts?(x)': () => 'npm run tsc', // '**/*.ts?(x)': () => 'npm run tsc',
'*.{js,jsx,ts,tsx}': [ '*.{js,jsx,ts,tsx}': [
'yarn run checkIgnoredFiles', 'yarn checkIgnoredFiles',
// 'yarn run checkLibPaths', // 'yarn checkLibPaths',
'yarn run packageJsonLint', 'yarn packageJsonLint',
'yarn run linter-precommit', 'yarn linter-precommit',
], ],
}; };

View File

@ -14,13 +14,13 @@
"scripts": { "scripts": {
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md", "buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
"buildScriptIndexes": "node packages/tools/gulp/tasks/buildScriptIndexesRun.js", "buildScriptIndexes": "node packages/tools/gulp/tasks/buildScriptIndexesRun.js",
"buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 --topological run build && yarn run tsc", "buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 --topological run build && yarn tsc",
"buildPluginDoc": "cd packages/generate-plugin-doc && yarn run buildPluginDoc_", "buildPluginDoc": "cd packages/generate-plugin-doc && yarn buildPluginDoc_",
"buildSequential": "yarn workspaces foreach --verbose --interlaced --topological run build && yarn run tsc", "buildSequential": "yarn workspaces foreach --verbose --interlaced --topological run build && yarn tsc",
"buildServerDocker": "node packages/tools/buildServerDocker.js", "buildServerDocker": "node packages/tools/buildServerDocker.js",
"buildSettingJsonSchema": "yarn workspace joplin start settingschema ../../../joplin-website/docs/schema/settings.json", "buildSettingJsonSchema": "yarn workspace joplin start settingschema ../../../joplin-website/docs/schema/settings.json",
"buildTranslations": "node packages/tools/build-translation.js", "buildTranslations": "node packages/tools/build-translation.js",
"buildWebsite": "node ./packages/tools/website/processDocs.js --env prod && node ./packages/tools/website/build.js && yarn run buildPluginDoc && yarn run buildSettingJsonSchema", "buildWebsite": "node ./packages/tools/website/processDocs.js --env prod && node ./packages/tools/website/build.js && yarn buildPluginDoc && yarn buildSettingJsonSchema",
"buildWebsiteTranslations": "node packages/tools/website/buildTranslations.js", "buildWebsiteTranslations": "node packages/tools/website/buildTranslations.js",
"checkIgnoredFiles": "node ./packages/tools/checkIgnoredFiles.js", "checkIgnoredFiles": "node ./packages/tools/checkIgnoredFiles.js",
"checkLibPaths": "node ./packages/tools/checkLibPaths.js", "checkLibPaths": "node ./packages/tools/checkLibPaths.js",
@ -40,7 +40,7 @@
"packageJsonLint": "node ./packages/tools/packageJsonLint.js", "packageJsonLint": "node ./packages/tools/packageJsonLint.js",
"postinstall": "gulp build", "postinstall": "gulp build",
"postPreReleasesToForum": "node ./packages/tools/postPreReleasesToForum", "postPreReleasesToForum": "node ./packages/tools/postPreReleasesToForum",
"publishAll": "git pull && yarn run buildParallel && lerna version --yes --no-private --no-git-tag-version && gulp completePublishAll", "publishAll": "git pull && yarn buildParallel && lerna version --yes --no-private --no-git-tag-version && gulp completePublishAll",
"releaseAndroid": "PATH=\"/usr/local/opt/openjdk@11/bin:$PATH\" node packages/tools/release-android.js", "releaseAndroid": "PATH=\"/usr/local/opt/openjdk@11/bin:$PATH\" node packages/tools/release-android.js",
"releaseAndroidClean": "node packages/tools/release-android.js", "releaseAndroidClean": "node packages/tools/release-android.js",
"releaseCli": "node packages/tools/release-cli.js", "releaseCli": "node packages/tools/release-cli.js",

View File

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
set -e set -e
yarn run build && NODE_PATH=build node build/build-doc.js yarn build && NODE_PATH=build node build/build-doc.js

View File

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
set -e set -e
yarn run build && NODE_PATH="build/" node build/cli-integration-tests.js yarn build && NODE_PATH="build/" node build/cli-integration-tests.js

View File

@ -2,7 +2,7 @@
# Start the server with: # Start the server with:
# #
# JOPLIN_IS_TESTING=1 yarn run start-dev # JOPLIN_IS_TESTING=1 yarn start-dev
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
# #
set -e set -e
yarn run build && NODE_PATH="build/" node build/fuzzing.js yarn build && NODE_PATH="build/" node build/fuzzing.js

View File

@ -4,4 +4,4 @@
# - Run the below command # - Run the below command
# - Then the file /manifests.json also needs to be updated with the new manifest file # - Then the file /manifests.json also needs to be updated with the new manifest file
yarn run dist && cp publish/org.joplinapp.plugins.RegisterCommandDemo.jpl ~/src/joplin-plugins-test/plugins/org.joplinapp.plugins.RegisterCommandDemo/plugin.jpl && cp publish/org.joplinapp.plugins.RegisterCommandDemo.json ~/src/joplin-plugins-test/plugins/org.joplinapp.plugins.RegisterCommandDemo/plugin.json yarn dist && cp publish/org.joplinapp.plugins.RegisterCommandDemo.jpl ~/src/joplin-plugins-test/plugins/org.joplinapp.plugins.RegisterCommandDemo/plugin.jpl && cp publish/org.joplinapp.plugins.RegisterCommandDemo.json ~/src/joplin-plugins-test/plugins/org.joplinapp.plugins.RegisterCommandDemo/plugin.json

View File

@ -8,7 +8,7 @@
// - Run the Postgres database -- `sudo docker-compose --file docker-compose.db-dev.yml up` // - Run the Postgres database -- `sudo docker-compose --file docker-compose.db-dev.yml up`
// - Update the DB parameters in ~/joplin-credentials/server.env to use the dev // - Update the DB parameters in ~/joplin-credentials/server.env to use the dev
// database // database
// - Run the server - `JOPLIN_IS_TESTING=1 yarn run start-dev` // - Run the server - `JOPLIN_IS_TESTING=1 yarn start-dev`
// - Then run this script - `node populateDatabase.js` // - Then run this script - `node populateDatabase.js`
// //
// Currently it doesn't actually create the users, so that should be done using: // Currently it doesn't actually create the users, so that should be done using:

View File

@ -7,7 +7,7 @@ export CI=true
if test "$RUNNER_OS" = "Linux" ; then if test "$RUNNER_OS" = "Linux" ; then
# The Ubuntu Github CI doesn't have a display server. # The Ubuntu Github CI doesn't have a display server.
# Start a virtual one with xvfb-run. # Start a virtual one with xvfb-run.
xvfb-run -- yarn run playwright test xvfb-run -- yarn playwright test
else else
yarn run playwright test yarn playwright test
fi fi

View File

@ -5,7 +5,7 @@
"main": "main.js", "main": "main.js",
"private": true, "private": true,
"scripts": { "scripts": {
"dist": "yarn run electronRebuild && npx electron-builder", "dist": "yarn electronRebuild && npx electron-builder",
"build": "gulp build", "build": "gulp build",
"electronBuilder": "gulp electronBuilder", "electronBuilder": "gulp electronBuilder",
"electronRebuild": "gulp electronRebuild", "electronRebuild": "gulp electronRebuild",

View File

@ -4,4 +4,4 @@ rmdir /s/q android\build
rmdir /s/q android\.gradle rmdir /s/q android\.gradle
rmdir /s/q node_modules rmdir /s/q node_modules
yarn install yarn install
yarn run start yarn start

View File

@ -1,7 +1,7 @@
/* eslint-disable import/prefer-default-export */ /* eslint-disable import/prefer-default-export */
// This contains the CodeMirror instance, which needs to be built into a bundle // This contains the CodeMirror instance, which needs to be built into a bundle
// using `yarn run buildInjectedJs`. This bundle is then loaded from // using `yarn buildInjectedJs`. This bundle is then loaded from
// NoteEditor.tsx into the webview. // NoteEditor.tsx into the webview.
// //
// In general, since this file is harder to debug due to the intermediate built // In general, since this file is harder to debug due to the intermediate built

View File

@ -5,7 +5,7 @@ CLI_DIR="$SCRIPT_DIR/../app-cli"
LIB_DIR="$SCRIPT_DIR/../lib" LIB_DIR="$SCRIPT_DIR/../lib"
cd "$LIB_DIR" cd "$LIB_DIR"
yarn run generatePluginTypes yarn generatePluginTypes
cd "$SCRIPT_DIR" cd "$SCRIPT_DIR"
rsync -a --delete "$LIB_DIR/plugin_types/lib/services/plugins/api/" "$SCRIPT_DIR/generators/app/templates/api/" rsync -a --delete "$LIB_DIR/plugin_types/lib/services/plugins/api/" "$SCRIPT_DIR/generators/app/templates/api/"

View File

@ -11,7 +11,7 @@
"scripts": { "scripts": {
"tsc": "tsc --project tsconfig.json", "tsc": "tsc --project tsconfig.json",
"watch": "tsc --watch --preserveWatchOutput --project tsconfig.json", "watch": "tsc --watch --preserveWatchOutput --project tsconfig.json",
"generatePluginTypes": "rm -rf ./plugin_types && yarn run tsc --declaration --declarationDir ./plugin_types --project tsconfig.json", "generatePluginTypes": "rm -rf ./plugin_types && yarn tsc --declaration --declarationDir ./plugin_types --project tsconfig.json",
"test": "jest --verbose=false", "test": "jest --verbose=false",
"test-ci": "yarn test" "test-ci": "yarn test"
}, },

View File

@ -10,7 +10,7 @@
}, },
"scripts": { "scripts": {
"buildAssets": "node Tools/buildAssets.js", "buildAssets": "node Tools/buildAssets.js",
"build": "yarn run buildAssets", "build": "yarn buildAssets",
"tsc": "tsc --project tsconfig.json", "tsc": "tsc --project tsconfig.json",
"watch": "tsc --watch --preserveWatchOutput --project tsconfig.json", "watch": "tsc --watch --preserveWatchOutput --project tsconfig.json",
"test": "jest", "test": "jest",

View File

@ -3,7 +3,7 @@ set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR" cd "$SCRIPT_DIR"
yarn run buildAssets yarn buildAssets
npm version patch npm version patch
npm publish npm publish

View File

@ -3,15 +3,15 @@
"version": "2.14.2", "version": "2.14.2",
"private": true, "private": true,
"scripts": { "scripts": {
"start-dev": "yarn run build && JOPLIN_IS_TESTING=1 nodemon --config nodemon.json --ext ts,js,mustache,css,tsx dist/app.js --env dev", "start-dev": "yarn build && JOPLIN_IS_TESTING=1 nodemon --config nodemon.json --ext ts,js,mustache,css,tsx dist/app.js --env dev",
"start-prod": "pm2 kill && pm2 start --no-daemon --exp-backoff-restart-delay=1000 dist/app.js", "start-prod": "pm2 kill && pm2 start --no-daemon --exp-backoff-restart-delay=1000 dist/app.js",
"rebuild": "yarn run clean && yarn run build && yarn run tsc", "rebuild": "yarn clean && yarn build && yarn tsc",
"build": "gulp build", "build": "gulp build",
"devCreateDb": "node dist/app.js --env dev --create-db", "devCreateDb": "node dist/app.js --env dev --create-db",
"devDropTables": "node dist/app.js --env dev --drop-tables", "devDropTables": "node dist/app.js --env dev --drop-tables",
"devDropDb": "node dist/app.js --env dev --drop-db", "devDropDb": "node dist/app.js --env dev --drop-db",
"start": "node dist/app.js", "start": "node dist/app.js",
"generateTypes": "rm -f db-buildTypes.sqlite && yarn run start --env buildTypes migrate latest && node dist/tools/generateTypes.js && mv db-buildTypes.sqlite schema.sqlite", "generateTypes": "rm -f db-buildTypes.sqlite && yarn start --env buildTypes migrate latest && node dist/tools/generateTypes.js && mv db-buildTypes.sqlite schema.sqlite",
"tsc": "tsc --project tsconfig.json", "tsc": "tsc --project tsconfig.json",
"test": "jest --verbose=false", "test": "jest --verbose=false",
"test-ci": "yarn test", "test-ci": "yarn test",

View File

@ -1,9 +1,9 @@
# How to test the complete workflow locally # How to test the complete workflow locally
- In website/build.ts, set the env to "dev", then build the website - `yarn run watchWebsite` - In website/build.ts, set the env to "dev", then build the website - `yarn watchWebsite`
- Start the Stripe CLI tool: `yarn run stripeListen` - Start the Stripe CLI tool: `yarn stripeListen`
- Copy the webhook secret, and paste it in joplin-credentials/server.env (under STRIPE_WEBHOOK_SECRET) - Copy the webhook secret, and paste it in joplin-credentials/server.env (under STRIPE_WEBHOOK_SECRET)
- Start the local Joplin Server, `yarn run start-dev`, running under http://joplincloud.local:22300 - Start the local Joplin Server, `yarn start-dev`, running under http://joplincloud.local:22300
- Start the workflow from http://localhost:8077/plans/ - Start the workflow from http://localhost:8077/plans/
- The local website often is not configured to send email, but you can see them in the database, in the "emails" table. - The local website often is not configured to send email, but you can see them in the database, in the "emails" table.

View File

@ -138,7 +138,7 @@ export enum TaskId {
} }
// AUTO-GENERATED-TYPES // AUTO-GENERATED-TYPES
// Auto-generated using `yarn run generate-types` // Auto-generated using `yarn generate-types`
export interface Session extends WithDates, WithUuid { export interface Session extends WithDates, WithUuid {
user_id?: Uuid; user_id?: Uuid;
auth_code?: string; auth_code?: string;

View File

@ -212,7 +212,7 @@ async function main() {
tableStrings.push(createRuntimeObject(table)); tableStrings.push(createRuntimeObject(table));
} }
let content = `// Auto-generated using \`yarn run generate-types\`\n${typeStrings.join('\n\n')}`; let content = `// Auto-generated using \`yarn generate-types\`\n${typeStrings.join('\n\n')}`;
content += '\n\n'; content += '\n\n';
content += `export const databaseSchema: DatabaseTables = {\n${tableStrings.join('\n')}\n};`; content += `export const databaseSchema: DatabaseTables = {\n${tableStrings.join('\n')}\n};`;

View File

@ -10,7 +10,7 @@ const main = async () => {
'.eslintignore': await readFile('.eslintignore', 'utf8'), '.eslintignore': await readFile('.eslintignore', 'utf8'),
}; };
await execCommand('yarn run updateIgnored', { quiet: true }); await execCommand('yarn updateIgnored', { quiet: true });
const newContent = { const newContent = {
'.gitignore': await readFile('.gitignore', 'utf8'), '.gitignore': await readFile('.gitignore', 'utf8'),
@ -20,7 +20,7 @@ const main = async () => {
if (newContent['.gitignore'] !== previousContent['.gitignore'] || newContent['.eslintignore'] !== previousContent['.eslintignore']) { if (newContent['.gitignore'] !== previousContent['.gitignore'] || newContent['.eslintignore'] !== previousContent['.eslintignore']) {
await writeFile('.gitignore', previousContent['.gitignore'], 'utf8'); await writeFile('.gitignore', previousContent['.gitignore'], 'utf8');
await writeFile('.eslintignore', previousContent['.eslintignore'], 'utf8'); await writeFile('.eslintignore', previousContent['.eslintignore'], 'utf8');
throw new Error('.gitignore or .eslintignore would be modified - run `yarn run updateIgnored`'); throw new Error('.gitignore or .eslintignore would be modified - run `yarn updateIgnored`');
} }
}; };

View File

@ -8,7 +8,7 @@ const main = async () => {
const rootDir = await getRootDir(); const rootDir = await getRootDir();
chdir(rootDir); chdir(rootDir);
await execCommand('yarn run npmPkgJsonLint --configFile .npmpackagejsonlintrc.json --quiet .'); await execCommand('yarn npmPkgJsonLint --configFile .npmpackagejsonlintrc.json --quiet .');
}; };
main().catch((error) => { main().catch((error) => {

View File

@ -137,7 +137,7 @@ async function createRelease(projectName: string, name: string, tagName: string,
console.info(`Running from: ${process.cwd()}`); console.info(`Running from: ${process.cwd()}`);
await execCommand('yarn install', { showStdout: false }); await execCommand('yarn install', { showStdout: false });
await execCommand('yarn run tsc', { showStdout: false }); await execCommand('yarn tsc', { showStdout: false });
console.info(`Building APK file v${suffix}...`); console.info(`Building APK file v${suffix}...`);

View File

@ -16,7 +16,7 @@ async function main() {
const newTag = `cli-${newVersion}`; const newTag = `cli-${newVersion}`;
await execCommand('touch app/main.js'); await execCommand('touch app/main.js');
await execCommand('yarn run build'); await execCommand('yarn build');
await execCommand('cp ../../README.md build/'); await execCommand('cp ../../README.md build/');
process.chdir(`${appDir}/build`); process.chdir(`${appDir}/build`);

View File

@ -8,10 +8,10 @@ async function main() {
await gitPullTry(); await gitPullTry();
chdir(rootDir); chdir(rootDir);
await execCommand('yarn run tsc'); await execCommand('yarn tsc');
chdir(workDir); chdir(workDir);
await execCommand('yarn run dist'); await execCommand('yarn dist');
const newVersion = (await execCommand('npm version patch')).trim(); const newVersion = (await execCommand('npm version patch')).trim();

View File

@ -4,5 +4,5 @@ set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
ROOT_DIR="$SCRIPT_DIR/../.." ROOT_DIR="$SCRIPT_DIR/../.."
yarn run build yarn build
cd $ROOT_DIR/packages/app-cli && yarn run test -- HtmlToMd cd $ROOT_DIR/packages/app-cli && yarn test -- HtmlToMd

View File

@ -21,7 +21,7 @@
}, },
"scripts": { "scripts": {
"tsc": "tsc --project tsconfig.json", "tsc": "tsc --project tsconfig.json",
"build": "yarn run tsc", "build": "yarn tsc",
"watch": "tsc --watch --preserveWatchOutput --project tsconfig.json", "watch": "tsc --watch --preserveWatchOutput --project tsconfig.json",
"test": "jest --verbose=false", "test": "jest --verbose=false",
"test-ci": "yarn test" "test-ci": "yarn test"

View File

@ -78,9 +78,9 @@ To test the extension please refer to the relevant pages for each browser: [Fire
To make changes to the application, you'll need to rebuild any TypeScript file you've changed. The simplest way to do this is to watch for changes from the root of the project. Simply run this command, and it should take care of the rest: To make changes to the application, you'll need to rebuild any TypeScript file you've changed. The simplest way to do this is to watch for changes from the root of the project. Simply run this command, and it should take care of the rest:
yarn run watch yarn watch
Running `yarn run tsc` would have the same effect, but without watching. Running `yarn tsc` would have the same effect, but without watching.
## Running an application with additional parameters ## Running an application with additional parameters

View File

@ -6,7 +6,7 @@ Various scripts are provided to deploy the Joplin applications, scripts and tool
Before new releases are created, all version numbers must be updated. This is done using the `setupNewRelease` script and passing it the new major.minor version number. For example: Before new releases are created, all version numbers must be updated. This is done using the `setupNewRelease` script and passing it the new major.minor version number. For example:
yarn run setupNewRelease 1.8 yarn setupNewRelease 1.8
Patch numbers are going to be incremented automatically when releasing each individual package. Patch numbers are going to be incremented automatically when releasing each individual package.
@ -14,13 +14,13 @@ Patch numbers are going to be incremented automatically when releasing each indi
The desktop application is built for Windows, macOS and Linux via continuous integration, by pushing a version tag to GitHub. The process is automated using: The desktop application is built for Windows, macOS and Linux via continuous integration, by pushing a version tag to GitHub. The process is automated using:
yarn run releaseDesktop yarn releaseDesktop
## Android application ## Android application
The app is built and upload to GitHub using: The app is built and upload to GitHub using:
yarn run releaseAndroid --type=prerelease yarn releaseAndroid --type=prerelease
The "type" parameter can be either "release" or "prerelease" The "type" parameter can be either "release" or "prerelease"
@ -32,7 +32,7 @@ It must be built and released manually using XCode.
Unlike the mobile or desktop application, the CLI app doesn't bundle its dependencies and is always installed from source. For that reason, all its `@joplin` dependencies must be deployed publicly first. This is done using: Unlike the mobile or desktop application, the CLI app doesn't bundle its dependencies and is always installed from source. For that reason, all its `@joplin` dependencies must be deployed publicly first. This is done using:
yarn run publishAll yarn publishAll
This is going to publish all the Joplin libraries, such as `@joplin/lib`, `@joplin/tools`, etc. This is going to publish all the Joplin libraries, such as `@joplin/lib`, `@joplin/tools`, etc.
@ -52,28 +52,28 @@ Then in `app-cli/package.json`, all `@joplin` dependencies and devdependencies m
Finally, to release the actual app, run: Finally, to release the actual app, run:
yarn run releaseCli yarn releaseCli
## Joplin Server ## Joplin Server
Run: Run:
yarn run releaseServer yarn releaseServer
## Web clipper ## Web clipper
Run: Run:
yarn run releaseClipper yarn releaseClipper
## Plugin generator ## Plugin generator
First the types should generally be updated, using `./updateTypes.sh`. Then run: First the types should generally be updated, using `./updateTypes.sh`. Then run:
yarn run releasePluginGenerator yarn releasePluginGenerator
## Plugin Repo Cli ## Plugin Repo Cli
This tool is packaged using Webpack so it can be released with a single command: This tool is packaged using Webpack so it can be released with a single command:
yarn run releasePluginRepoCli yarn releasePluginRepoCli

View File

@ -4,13 +4,13 @@ Coding style is mostly enforced by a pre-commit hook that runs `eslint`. This ho
## Enforcing rules using eslint ## Enforcing rules using eslint
Whenever possible, coding style should be enforced using an eslint rule. To do so, add the relevant rule or plugin to `eslintrc.js`. To manually run the linter, run `yarn run linter ./` from the root of the project. Whenever possible, coding style should be enforced using an eslint rule. To do so, add the relevant rule or plugin to `eslintrc.js`. To manually run the linter, run `yarn linter ./` from the root of the project.
When adding a rule, you will often find that many files will no longer pass the linter. In that case, you have two options: When adding a rule, you will often find that many files will no longer pass the linter. In that case, you have two options:
- Fix the files one by one. If there aren't too many files, and the changes are simple (they are unlikely to introduce regressions), this is the preferred solution. - Fix the files one by one. If there aren't too many files, and the changes are simple (they are unlikely to introduce regressions), this is the preferred solution.
- Or use `yarn run linter-interactive ./` to disable existing errors. The interactive tool will process all the files and you can then choose to disable any existing error that it finds (by adding a `eslint-disable-next-line` comment above it). This allows keeping the existing, working codebase as it is, and enforcing that new code follows the rule. When using this method, add the comment "Old code before rule was applied" so that we can easily find back all the lines that have been automatically disabled. - Or use `yarn linter-interactive ./` to disable existing errors. The interactive tool will process all the files and you can then choose to disable any existing error that it finds (by adding a `eslint-disable-next-line` comment above it). This allows keeping the existing, working codebase as it is, and enforcing that new code follows the rule. When using this method, add the comment "Old code before rule was applied" so that we can easily find back all the lines that have been automatically disabled.
## TypeScript rules ## TypeScript rules
@ -20,7 +20,7 @@ Because the TypeScript compiler generates `.js` files, be sure to add these new
To do this, To do this,
1. If the TypeScript compiler has already generated a `.js` file for the new `.ts` file, delete it. 1. If the TypeScript compiler has already generated a `.js` file for the new `.ts` file, delete it.
2. Run `yarn run updateIgnored` in the root directory of the project (or `yarn run postinstall`) 2. Run `yarn updateIgnored` in the root directory of the project (or `yarn postinstall`)
### Convert existing `.js` files to TypeScript before modifying ### Convert existing `.js` files to TypeScript before modifying

View File

@ -37,7 +37,7 @@ Some plugins need patching. To create or update a plugin's patch, run the `patch
For example, For example,
```shell ```shell
$ cd packages/default-plugins $ cd packages/default-plugins
$ yarn run patch plugin.id.here $ yarn patch plugin.id.here
``` ```
The script will create a temporary directory in which changes can be made. Do not stage the changes that should appear in the patch. The script will create a temporary directory in which changes can be made. Do not stage the changes that should appear in the patch.