mirror of https://github.com/laurent22/joplin.git
Chore: Rename instances of `yarn run` to just `yarn`
parent
999baf4b3d
commit
c94ec4e064
|
@ -107,7 +107,7 @@ if [ "$RUN_TESTS" == "1" ]; then
|
|||
#
|
||||
# https://stackoverflow.com/questions/38558989
|
||||
export NODE_OPTIONS="--max-old-space-size=32768"
|
||||
yarn run test-ci
|
||||
yarn test-ci
|
||||
testResult=$?
|
||||
if [ $testResult -ne 0 ]; then
|
||||
exit $testResult
|
||||
|
@ -122,13 +122,13 @@ fi
|
|||
if [ "$RUN_TESTS" == "1" ]; then
|
||||
echo "Step: Running linter..."
|
||||
|
||||
yarn run linter-ci ./
|
||||
yarn linter-ci ./
|
||||
testResult=$?
|
||||
if [ $testResult -ne 0 ]; then
|
||||
exit $testResult
|
||||
fi
|
||||
|
||||
yarn run packageJsonLint
|
||||
yarn packageJsonLint
|
||||
testResult=$?
|
||||
if [ $testResult -ne 0 ]; then
|
||||
exit $testResult
|
||||
|
@ -175,7 +175,7 @@ fi
|
|||
|
||||
# =============================================================================
|
||||
# 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
|
||||
# =============================================================================
|
||||
|
||||
|
@ -200,7 +200,7 @@ if [ "$RUN_TESTS" == "1" ]; then
|
|||
|
||||
mkdir -p ../joplin-website/docs
|
||||
ll ../joplin-website/docs/api/references/plugin_api
|
||||
SKIP_SPONSOR_PROCESSING=1 yarn run buildWebsite
|
||||
SKIP_SPONSOR_PROCESSING=1 yarn buildWebsite
|
||||
testResult=$?
|
||||
if [ $testResult -ne 0 ]; then
|
||||
exit $testResult
|
||||
|
@ -253,14 +253,14 @@ if [ "$IS_DESKTOP_RELEASE" == "1" ]; then
|
|||
# "python" and seems to no longer respect the PYTHON_PATH environment variable.
|
||||
# We work around this by aliasing python.
|
||||
alias python=$(which python3)
|
||||
USE_HARD_LINKS=false yarn run dist
|
||||
USE_HARD_LINKS=false yarn dist
|
||||
else
|
||||
USE_HARD_LINKS=false yarn run dist
|
||||
USE_HARD_LINKS=false yarn dist
|
||||
fi
|
||||
elif [[ $IS_LINUX = 1 ]] && [ "$IS_SERVER_RELEASE" == "1" ]; then
|
||||
echo "Step: Building Docker Image..."
|
||||
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
|
||||
echo "Step: Building but *not* publishing desktop application..."
|
||||
|
||||
|
@ -274,8 +274,8 @@ else
|
|||
export CSC_IDENTITY_AUTO_DISCOVERY=false
|
||||
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
|
||||
USE_HARD_LINKS=false yarn run dist --publish=never
|
||||
USE_HARD_LINKS=false yarn dist --publish=never
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -67,7 +67,7 @@ jobs:
|
|||
|
||||
if [[ $GIT_TAG_NAME = v* ]]; then
|
||||
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"
|
||||
else
|
||||
|
@ -80,5 +80,5 @@ jobs:
|
|||
export CSC_IDENTITY_AUTO_DISCOVERY=false
|
||||
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
|
||||
|
|
|
@ -141,7 +141,7 @@ jobs:
|
|||
# To ensure that the operations stop on failure, all commands
|
||||
# should be on one line with "&&" in between.
|
||||
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
|
||||
# verify that the build process hasn't been broken.
|
||||
|
@ -153,7 +153,7 @@ jobs:
|
|||
SERVER_REPOSITORY: joplin/server
|
||||
SERVER_TAG_PREFIX: server
|
||||
run: |
|
||||
yarn install && cd packages/app-desktop && yarn run dist --publish=never
|
||||
yarn install && cd packages/app-desktop && yarn dist --publish=never
|
||||
|
||||
ServerDockerImage:
|
||||
needs: pre_job
|
||||
|
@ -197,7 +197,7 @@ jobs:
|
|||
BUILD_SEQUENCIAL: 1
|
||||
run: |
|
||||
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
|
||||
# code 0 if it works.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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.
|
||||
|
||||
version: '3'
|
||||
|
|
|
@ -11,9 +11,9 @@ module.exports = {
|
|||
//
|
||||
// '**/*.ts?(x)': () => 'npm run tsc',
|
||||
'*.{js,jsx,ts,tsx}': [
|
||||
'yarn run checkIgnoredFiles',
|
||||
// 'yarn run checkLibPaths',
|
||||
'yarn run packageJsonLint',
|
||||
'yarn run linter-precommit',
|
||||
'yarn checkIgnoredFiles',
|
||||
// 'yarn checkLibPaths',
|
||||
'yarn packageJsonLint',
|
||||
'yarn linter-precommit',
|
||||
],
|
||||
};
|
||||
|
|
10
package.json
10
package.json
|
@ -14,13 +14,13 @@
|
|||
"scripts": {
|
||||
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
|
||||
"buildScriptIndexes": "node packages/tools/gulp/tasks/buildScriptIndexesRun.js",
|
||||
"buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 --topological run build && yarn run tsc",
|
||||
"buildPluginDoc": "cd packages/generate-plugin-doc && yarn run buildPluginDoc_",
|
||||
"buildSequential": "yarn workspaces foreach --verbose --interlaced --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 buildPluginDoc_",
|
||||
"buildSequential": "yarn workspaces foreach --verbose --interlaced --topological run build && yarn tsc",
|
||||
"buildServerDocker": "node packages/tools/buildServerDocker.js",
|
||||
"buildSettingJsonSchema": "yarn workspace joplin start settingschema ../../../joplin-website/docs/schema/settings.json",
|
||||
"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",
|
||||
"checkIgnoredFiles": "node ./packages/tools/checkIgnoredFiles.js",
|
||||
"checkLibPaths": "node ./packages/tools/checkLibPaths.js",
|
||||
|
@ -40,7 +40,7 @@
|
|||
"packageJsonLint": "node ./packages/tools/packageJsonLint.js",
|
||||
"postinstall": "gulp build",
|
||||
"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",
|
||||
"releaseAndroidClean": "node packages/tools/release-android.js",
|
||||
"releaseCli": "node packages/tools/release-cli.js",
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
yarn run build && NODE_PATH=build node build/build-doc.js
|
||||
yarn build && NODE_PATH=build node build/build-doc.js
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
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
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# 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 )"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
set -e
|
||||
yarn run build && NODE_PATH="build/" node build/fuzzing.js
|
||||
yarn build && NODE_PATH="build/" node build/fuzzing.js
|
|
@ -4,4 +4,4 @@
|
|||
# - Run the below command
|
||||
# - 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
|
|
@ -8,7 +8,7 @@
|
|||
// - 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
|
||||
// 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`
|
||||
//
|
||||
// Currently it doesn't actually create the users, so that should be done using:
|
||||
|
|
|
@ -7,7 +7,7 @@ export CI=true
|
|||
if test "$RUNNER_OS" = "Linux" ; then
|
||||
# The Ubuntu Github CI doesn't have a display server.
|
||||
# Start a virtual one with xvfb-run.
|
||||
xvfb-run -- yarn run playwright test
|
||||
xvfb-run -- yarn playwright test
|
||||
else
|
||||
yarn run playwright test
|
||||
yarn playwright test
|
||||
fi
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"main": "main.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dist": "yarn run electronRebuild && npx electron-builder",
|
||||
"dist": "yarn electronRebuild && npx electron-builder",
|
||||
"build": "gulp build",
|
||||
"electronBuilder": "gulp electronBuilder",
|
||||
"electronRebuild": "gulp electronRebuild",
|
||||
|
|
|
@ -4,4 +4,4 @@ rmdir /s/q android\build
|
|||
rmdir /s/q android\.gradle
|
||||
rmdir /s/q node_modules
|
||||
yarn install
|
||||
yarn run start
|
||||
yarn start
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable import/prefer-default-export */
|
||||
|
||||
// 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.
|
||||
//
|
||||
// In general, since this file is harder to debug due to the intermediate built
|
||||
|
|
|
@ -5,7 +5,7 @@ CLI_DIR="$SCRIPT_DIR/../app-cli"
|
|||
LIB_DIR="$SCRIPT_DIR/../lib"
|
||||
|
||||
cd "$LIB_DIR"
|
||||
yarn run generatePluginTypes
|
||||
yarn generatePluginTypes
|
||||
|
||||
cd "$SCRIPT_DIR"
|
||||
rsync -a --delete "$LIB_DIR/plugin_types/lib/services/plugins/api/" "$SCRIPT_DIR/generators/app/templates/api/"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"scripts": {
|
||||
"tsc": "tsc --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-ci": "yarn test"
|
||||
},
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"buildAssets": "node Tools/buildAssets.js",
|
||||
"build": "yarn run buildAssets",
|
||||
"build": "yarn buildAssets",
|
||||
"tsc": "tsc --project tsconfig.json",
|
||||
"watch": "tsc --watch --preserveWatchOutput --project tsconfig.json",
|
||||
"test": "jest",
|
||||
|
|
|
@ -3,7 +3,7 @@ set -e
|
|||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$SCRIPT_DIR"
|
||||
yarn run buildAssets
|
||||
yarn buildAssets
|
||||
npm version patch
|
||||
npm publish
|
||||
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
"version": "2.14.2",
|
||||
"private": true,
|
||||
"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",
|
||||
"rebuild": "yarn run clean && yarn run build && yarn run tsc",
|
||||
"rebuild": "yarn clean && yarn build && yarn tsc",
|
||||
"build": "gulp build",
|
||||
"devCreateDb": "node dist/app.js --env dev --create-db",
|
||||
"devDropTables": "node dist/app.js --env dev --drop-tables",
|
||||
"devDropDb": "node dist/app.js --env dev --drop-db",
|
||||
"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",
|
||||
"test": "jest --verbose=false",
|
||||
"test-ci": "yarn test",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# How to test the complete workflow locally
|
||||
|
||||
- In website/build.ts, set the env to "dev", then build the website - `yarn run watchWebsite`
|
||||
- Start the Stripe CLI tool: `yarn run stripeListen`
|
||||
- In website/build.ts, set the env to "dev", then build the website - `yarn watchWebsite`
|
||||
- Start the Stripe CLI tool: `yarn stripeListen`
|
||||
- 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/
|
||||
- The local website often is not configured to send email, but you can see them in the database, in the "emails" table.
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ export enum TaskId {
|
|||
}
|
||||
|
||||
// AUTO-GENERATED-TYPES
|
||||
// Auto-generated using `yarn run generate-types`
|
||||
// Auto-generated using `yarn generate-types`
|
||||
export interface Session extends WithDates, WithUuid {
|
||||
user_id?: Uuid;
|
||||
auth_code?: string;
|
||||
|
|
|
@ -212,7 +212,7 @@ async function main() {
|
|||
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 += `export const databaseSchema: DatabaseTables = {\n${tableStrings.join('\n')}\n};`;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ const main = async () => {
|
|||
'.eslintignore': await readFile('.eslintignore', 'utf8'),
|
||||
};
|
||||
|
||||
await execCommand('yarn run updateIgnored', { quiet: true });
|
||||
await execCommand('yarn updateIgnored', { quiet: true });
|
||||
|
||||
const newContent = {
|
||||
'.gitignore': await readFile('.gitignore', 'utf8'),
|
||||
|
@ -20,7 +20,7 @@ const main = async () => {
|
|||
if (newContent['.gitignore'] !== previousContent['.gitignore'] || newContent['.eslintignore'] !== previousContent['.eslintignore']) {
|
||||
await writeFile('.gitignore', previousContent['.gitignore'], '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`');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ const main = async () => {
|
|||
|
||||
const rootDir = await getRootDir();
|
||||
chdir(rootDir);
|
||||
await execCommand('yarn run npmPkgJsonLint --configFile .npmpackagejsonlintrc.json --quiet .');
|
||||
await execCommand('yarn npmPkgJsonLint --configFile .npmpackagejsonlintrc.json --quiet .');
|
||||
};
|
||||
|
||||
main().catch((error) => {
|
||||
|
|
|
@ -137,7 +137,7 @@ async function createRelease(projectName: string, name: string, tagName: string,
|
|||
console.info(`Running from: ${process.cwd()}`);
|
||||
|
||||
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}...`);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ async function main() {
|
|||
const newTag = `cli-${newVersion}`;
|
||||
|
||||
await execCommand('touch app/main.js');
|
||||
await execCommand('yarn run build');
|
||||
await execCommand('yarn build');
|
||||
await execCommand('cp ../../README.md build/');
|
||||
|
||||
process.chdir(`${appDir}/build`);
|
||||
|
|
|
@ -8,10 +8,10 @@ async function main() {
|
|||
await gitPullTry();
|
||||
|
||||
chdir(rootDir);
|
||||
await execCommand('yarn run tsc');
|
||||
await execCommand('yarn tsc');
|
||||
|
||||
chdir(workDir);
|
||||
await execCommand('yarn run dist');
|
||||
await execCommand('yarn dist');
|
||||
|
||||
const newVersion = (await execCommand('npm version patch')).trim();
|
||||
|
||||
|
|
|
@ -4,5 +4,5 @@ set -e
|
|||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
ROOT_DIR="$SCRIPT_DIR/../.."
|
||||
|
||||
yarn run build
|
||||
cd $ROOT_DIR/packages/app-cli && yarn run test -- HtmlToMd
|
||||
yarn build
|
||||
cd $ROOT_DIR/packages/app-cli && yarn test -- HtmlToMd
|
|
@ -21,7 +21,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"tsc": "tsc --project tsconfig.json",
|
||||
"build": "yarn run tsc",
|
||||
"build": "yarn tsc",
|
||||
"watch": "tsc --watch --preserveWatchOutput --project tsconfig.json",
|
||||
"test": "jest --verbose=false",
|
||||
"test-ci": "yarn test"
|
||||
|
|
|
@ -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:
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
yarn run setupNewRelease 1.8
|
||||
yarn setupNewRelease 1.8
|
||||
|
||||
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:
|
||||
|
||||
yarn run releaseDesktop
|
||||
yarn releaseDesktop
|
||||
|
||||
## Android application
|
||||
|
||||
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"
|
||||
|
||||
|
@ -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:
|
||||
|
||||
yarn run publishAll
|
||||
yarn publishAll
|
||||
|
||||
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:
|
||||
|
||||
yarn run releaseCli
|
||||
yarn releaseCli
|
||||
|
||||
## Joplin Server
|
||||
|
||||
Run:
|
||||
|
||||
yarn run releaseServer
|
||||
yarn releaseServer
|
||||
|
||||
## Web clipper
|
||||
|
||||
Run:
|
||||
|
||||
yarn run releaseClipper
|
||||
yarn releaseClipper
|
||||
|
||||
## Plugin generator
|
||||
|
||||
First the types should generally be updated, using `./updateTypes.sh`. Then run:
|
||||
|
||||
yarn run releasePluginGenerator
|
||||
yarn releasePluginGenerator
|
||||
|
||||
## Plugin Repo Cli
|
||||
|
||||
This tool is packaged using Webpack so it can be released with a single command:
|
||||
|
||||
yarn run releasePluginRepoCli
|
||||
yarn releasePluginRepoCli
|
||||
|
|
|
@ -4,13 +4,13 @@ Coding style is mostly enforced by a pre-commit hook that runs `eslint`. This ho
|
|||
|
||||
## 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:
|
||||
|
||||
- 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
|
||||
|
||||
|
@ -20,7 +20,7 @@ Because the TypeScript compiler generates `.js` files, be sure to add these new
|
|||
|
||||
To do this,
|
||||
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
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ Some plugins need patching. To create or update a plugin's patch, run the `patch
|
|||
For example,
|
||||
```shell
|
||||
$ 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.
|
||||
|
|
Loading…
Reference in New Issue