From 213110e428e80e74b99be3c4868918518f36b7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Papie=C5=BC?= Date: Fri, 5 Sep 2025 22:01:09 +0000 Subject: [PATCH] fix: copy shell commands --- basics/authentication/firebaseauthprovider.md | 2 +- basics/features/import-and-export.md | 2 +- basics/features/leaflet-maps.md | 18 +++++------ basics/features/logger.md | 2 +- basics/features/password.md | 2 +- basics/features/relations.md | 2 +- basics/features/upload.md | 2 +- basics/themes.md | 6 ++-- ...ing-deploying-the-application-using-cli.md | 6 ++-- installation/adapters/objection.md | 2 +- installation/getting-started.md | 32 +++++++++---------- installation/migration-guide-v7.md | 2 +- installation/plugins/adonis.md | 16 +++++----- installation/plugins/express.md | 12 +++---- installation/plugins/fastify.md | 10 +++--- installation/plugins/hapi.md | 4 +-- installation/plugins/koa.md | 8 ++--- installation/plugins/nest.md | 10 +++--- tutorials/custom-components-library.md | 2 +- 19 files changed, 70 insertions(+), 70 deletions(-) diff --git a/basics/authentication/firebaseauthprovider.md b/basics/authentication/firebaseauthprovider.md index 3d40b4e..f6bbd72 100644 --- a/basics/authentication/firebaseauthprovider.md +++ b/basics/authentication/firebaseauthprovider.md @@ -23,7 +23,7 @@ All premium features currently use **One Time Payment** model and you can use th Installing the library: ```bash -$ yarn add @adminjs/firebase-auth +yarn add @adminjs/firebase-auth ``` The license key should be provided via `FirebaseAuthProvider` constructor: diff --git a/basics/features/import-and-export.md b/basics/features/import-and-export.md index d495a39..bf23240 100644 --- a/basics/features/import-and-export.md +++ b/basics/features/import-and-export.md @@ -9,7 +9,7 @@ AdminJS offers a feature called "@adminjs/import-export" which solves this use c To install add the package to your project. ```shell -$ yarn add @adminjs/import-export +yarn add @adminjs/import-export ``` Then add one line (`features`) to resource entry in AdminJS config. diff --git a/basics/features/leaflet-maps.md b/basics/features/leaflet-maps.md index a624724..91e2301 100644 --- a/basics/features/leaflet-maps.md +++ b/basics/features/leaflet-maps.md @@ -9,7 +9,7 @@ The Leaflet feature (`@adminjs/leaflet`) integrates Leaflet ([https://leafletjs. ## Installation ```bash -$ yarn add @adminjs/leaflet # or: npm install @adminjs/leaflet +yarn add @adminjs/leaflet # or: npm install @adminjs/leaflet ``` ## Usage @@ -232,14 +232,14 @@ An example application can be found in [@adminjs/leaflet GitHub repository](http ### Installation ```bash -$ git clone https://github.com/SoftwareBrothers/adminjs-leaflet.git -$ cd adminjs-leaflet -$ yarn install -$ yarn build -$ cd example-app -$ yarn install -$ docker-compose up -d -$ yarn start +git clone https://github.com/SoftwareBrothers/adminjs-leaflet.git +cd adminjs-leaflet +yarn install +yarn build +cd example-app +yarn install +docker-compose up -d +yarn start ``` ## Issues & Ideas diff --git a/basics/features/logger.md b/basics/features/logger.md index 440b341..50847bc 100644 --- a/basics/features/logger.md +++ b/basics/features/logger.md @@ -11,7 +11,7 @@ The logger's purpose is to keep track of selected resources (i.e. tables) Every Installation is pretty simple. First we have to install `@adminjs/logger` package ```shell -$ yarn add @adminjs/logger +yarn add @adminjs/logger ``` We can use any database and any ORM package as described in **Adapters** section. diff --git a/basics/features/password.md b/basics/features/password.md index 2b8be1f..d264220 100644 --- a/basics/features/password.md +++ b/basics/features/password.md @@ -9,7 +9,7 @@ The password feature can be utilized to hash a user's password when editing it's Installation ```shell -$ yarn add @adminjs/passwords +yarn add @adminjs/passwords ``` Next step is to add feature option to user resource diff --git a/basics/features/relations.md b/basics/features/relations.md index 9529510..d41c9b9 100644 --- a/basics/features/relations.md +++ b/basics/features/relations.md @@ -40,7 +40,7 @@ All premium features currently use **One Time Payment** model and you can use th Installing the library: ```bash -$ yarn add @adminjs/relations +yarn add @adminjs/relations ``` The license key should be provided to `owningRelationSettingsFeature`: diff --git a/basics/features/upload.md b/basics/features/upload.md index 32f4e8c..fc40bbb 100644 --- a/basics/features/upload.md +++ b/basics/features/upload.md @@ -14,7 +14,7 @@ There is possibility to use different storage for files: To install the upload feature run: -
$ yarn add @adminjs/upload
+
yarn add @adminjs/upload
 
The main concept of the upload feature is that it sends uploaded files to an external source. The database keeps the information about path and folder name where the file was stored. diff --git a/basics/themes.md b/basics/themes.md index 027025b..81f25e4 100644 --- a/basics/themes.md +++ b/basics/themes.md @@ -22,7 +22,7 @@ Themes are a new feature of AdminJS version 7 which introduces new UI customizat ### Installation ```bash -$ yarn add @adminjs/themes +yarn add @adminjs/themes ``` ### Usage @@ -178,8 +178,8 @@ const authenticate = (email, password) => { ### Commands ```bash -$ npx adminjs-themes generate -$ npx adminjs-themes bundle +npx adminjs-themes generate +npx adminjs-themes bundle ``` #### #generate diff --git a/deployment/creating-deploying-the-application-using-cli.md b/deployment/creating-deploying-the-application-using-cli.md index b612f3d..501ba00 100644 --- a/deployment/creating-deploying-the-application-using-cli.md +++ b/deployment/creating-deploying-the-application-using-cli.md @@ -14,7 +14,7 @@ Before you will make installation and configuration steps make sure you met all {% code overflow="wrap" %} ```bash -$ yarn global add @adminjs/cloud-cli +yarn global add @adminjs/cloud-cli ``` {% endcode %} @@ -92,7 +92,7 @@ config string optional Path to your configuration file (rel #### Usage ```bash -$ adminjs-cloud create --name= --database= --apiKey= --apiSecret= +adminjs-cloud create --name= --database= --apiKey= --apiSecret= ``` ### #deploy @@ -109,5 +109,5 @@ config string optional Path to your configuration file (rel #### Usage ```bash -$ adminjs-cloud deploy --apiKey= --apiSecret= --config=[string] +adminjs-cloud deploy --apiKey= --apiSecret= --config=[string] ``` diff --git a/installation/adapters/objection.md b/installation/adapters/objection.md index 4bd7abc..901ba12 100644 --- a/installation/adapters/objection.md +++ b/installation/adapters/objection.md @@ -18,7 +18,7 @@ Before you start connecting your Objection models to AdminJS, we strongly advise You might need to install an additional library `ajv-formats`: ```bash -$ yarn add ajv-formats +yarn add ajv-formats ``` {% code title="base-model.ts" %} diff --git a/installation/getting-started.md b/installation/getting-started.md index fba5bfc..497c96a 100644 --- a/installation/getting-started.md +++ b/installation/getting-started.md @@ -37,19 +37,19 @@ AdonisJS (and Lucid) integration should be installed using Adonis CLI. Please re **NPM:** ```bash -$ npm i -g @adminjs/cli +npm i -g @adminjs/cli ``` **Yarn:** ```bash -$ yarn global add @adminjs/cli +yarn global add @adminjs/cli ``` #### Usage ```bash -$ adminjs create +adminjs create ``` You may also set up your AdminJS application manually by following the rest of this documentation. @@ -59,29 +59,29 @@ You may also set up your AdminJS application manually by following the rest of t First of all, install the core package: ```bash -$ yarn add adminjs +yarn add adminjs ``` Next, install one of our plugins: ```bash -$ yarn add @adminjs/express # for Express server -$ yarn add @adminjs/nestjs # for Nest server -$ yarn add @adminjs/hapi # for Hapi server -$ yarn add @adminjs/koa # for Koa server -$ yarn add @adminjs/fastify # for Fastify server +yarn add @adminjs/express # for Express server +yarn add @adminjs/nestjs # for Nest server +yarn add @adminjs/hapi # for Hapi server +yarn add @adminjs/koa # for Koa server +yarn add @adminjs/fastify # for Fastify server ``` Finally, install an adapter: ```bash -$ yarn add @adminjs/typeorm # for TypeORM -$ yarn add @adminjs/sequelize # for Sequelize -$ yarn add @adminjs/mongoose # for Mongoose -$ yarn add @adminjs/prisma # for Prisma -$ yarn add @adminjs/mikroorm # for MikroORM -$ yarn add @adminjs/objection # for Objection -$ yarn add @adminjs/sql # for raw SQL, currently supports only Postgres +yarn add @adminjs/typeorm # for TypeORM +yarn add @adminjs/sequelize # for Sequelize +yarn add @adminjs/mongoose # for Mongoose +yarn add @adminjs/prisma # for Prisma +yarn add @adminjs/mikroorm # for MikroORM +yarn add @adminjs/objection # for Objection +yarn add @adminjs/sql # for raw SQL, currently supports only Postgres ``` ### Setup diff --git a/installation/migration-guide-v7.md b/installation/migration-guide-v7.md index 1e857e3..1c2a263 100644 --- a/installation/migration-guide-v7.md +++ b/installation/migration-guide-v7.md @@ -98,7 +98,7 @@ As a workaround, you can follow the steps below to resolve the problem. Install `@types/styled-components` as a `devDependency` in your project: -`$ yarn add -D @types/styled-components` +`yarn add -D @types/styled-components` Create a custom `d.ts` file which extends `@adminjs/design-system/styled-components` - for example `./vendor-types/adminjs-styled-components.d.ts`: diff --git a/installation/plugins/adonis.md b/installation/plugins/adonis.md index 2a30bf7..2201543 100644 --- a/installation/plugins/adonis.md +++ b/installation/plugins/adonis.md @@ -17,21 +17,21 @@ Below you will find a simplified list of steps required to set up your AdminJS p First of all, create your AdonisJS app if you haven't got one yet: ```bash -$ npm init adonisjs@latest -- -K=slim +npm init adonisjs@latest -- -K=slim ``` Follow the steps from AdonisJS CLI to configure your application and once it's installed, navigate to the newly created directory. ```bash -$ cd +cd ``` AdminJS requires you to install and configure `@adonisjs/session` and `@adonisjs/lucid` ```bash -$ npm install @adonisjs/session @adonisjs/lucid -$ node ace configure @adonisjs/session -$ node ace configure @adonisjs/lucid +npm install @adonisjs/session @adonisjs/lucid +node ace configure @adonisjs/session +node ace configure @adonisjs/lucid ``` This will create a configuration file for `@adonisjs/session` in `config/session.ts`. The default configuration will allow you to sign into your admin panel in your development environment, but before you deploy to production, please see the [official documentation](https://docs.adonisjs.com/guides/session#session). @@ -41,14 +41,14 @@ You should also configure Lucid in `config/database.ts`. Without this, you won't You will also need to install the core package of AdminJS: ```bash -$ npm install adminjs +npm install adminjs ``` Finally, install `@adminjs/adonis` which will add AdminJS integration into your application. ```bash -$ npm install @adminjs/adonis -$ node ace configure @adminjs/adonis +npm install @adminjs/adonis +node ace configure @adminjs/adonis ``` Three new files should appear in your codebase. diff --git a/installation/plugins/express.md b/installation/plugins/express.md index 481063c..47ad8fa 100644 --- a/installation/plugins/express.md +++ b/installation/plugins/express.md @@ -10,14 +10,14 @@ coverY: 0 Make sure you have installed AdminJS packages described in [Getting started](../getting-started.md) article. ```bash -$ yarn add adminjs @adminjs/express +yarn add adminjs @adminjs/express ``` {% endhint %} To setup AdminJS panel with Express.js you need to have `express` installed and required peer dependencies: ```bash -$ yarn add express tslib express-formidable express-session +yarn add express tslib express-formidable express-session ``` Afterwards, follow one of the examples below. @@ -56,7 +56,7 @@ start() Install Express types: ```bash -$ yarn add -D @types/express +yarn add -D @types/express ``` {% code title="app.ts" %} @@ -100,7 +100,7 @@ To add authentication, you must use `AdminJSExpress.buildAuthenticatedRouter` in Install additional dependencies: ```bash -$ yarn add connect-pg-simple +yarn add connect-pg-simple ``` {% code title="app.js" %} @@ -182,8 +182,8 @@ If you plan to copy-paste this example, make sure you set the database connectio Install additional dependencies: ```bash -$ yarn add connect-pg-simple -$ yarn add -D @types/connect-pg-simple @types/express-session @types/express +yarn add connect-pg-simple +yarn add -D @types/connect-pg-simple @types/express-session @types/express ``` {% code title="app.ts" %} diff --git a/installation/plugins/fastify.md b/installation/plugins/fastify.md index f9d9296..6f5ea47 100644 --- a/installation/plugins/fastify.md +++ b/installation/plugins/fastify.md @@ -10,14 +10,14 @@ coverY: 0 Make sure you have installed AdminJS packages described in [Getting started](../getting-started.md) article. ```bash -$ yarn add adminjs @adminjs/fastify +yarn add adminjs @adminjs/fastify ``` {% endhint %} To setup AdminJS panel with Fastify you need to have `fastify` installed and required peer dependencies: ```bash -$ yarn add fastify tslib +yarn add fastify tslib ``` Afterwards, follow one of the examples below. @@ -105,7 +105,7 @@ To add authentication, you must use `AdminJSFastify.buildAuthenticatedRouter` in Install additional dependencies: ```bash -$ yarn add @fastify/session connect-pg-simple +yarn add @fastify/session connect-pg-simple ``` {% code title="app.js" %} @@ -193,8 +193,8 @@ If you plan to copy-paste this example, make sure you set the database connectio Install additional dependencies: ```bash -$ yarn add @fastify/session connect-pg-simple -$ yarn add -D @types/connect-pg-simple +yarn add @fastify/session connect-pg-simple +yarn add -D @types/connect-pg-simple ``` {% code title="app.ts" %} diff --git a/installation/plugins/hapi.md b/installation/plugins/hapi.md index bf8eb7a..768ba8f 100644 --- a/installation/plugins/hapi.md +++ b/installation/plugins/hapi.md @@ -10,14 +10,14 @@ coverY: 0 Make sure you have installed AdminJS packages described in [Getting started](../getting-started.md) article. ```bash -$ yarn add adminjs @adminjs/hapi +yarn add adminjs @adminjs/hapi ``` {% endhint %} To setup AdminJS panel with Hapi you need to have `@hapi/hapi` installed and required peer dependencies: ```bash -$ yarn add @hapi/hapi @hapi/boom @hapi/cookie @hapi/inert +yarn add @hapi/hapi @hapi/boom @hapi/cookie @hapi/inert ``` Afterwards, follow one of the examples below. diff --git a/installation/plugins/koa.md b/installation/plugins/koa.md index 7e779ca..33131c8 100644 --- a/installation/plugins/koa.md +++ b/installation/plugins/koa.md @@ -10,14 +10,14 @@ coverY: 0 Make sure you have installed AdminJS packages described in [Getting started](../getting-started.md) article. ```bash -$ yarn add adminjs @adminjs/koa +yarn add adminjs @adminjs/koa ``` {% endhint %} To setup AdminJS panel with Koa you need to have `koa` installed and required peer dependencies: ```bash -$ yarn add koa @koa/router koa2-formidable +yarn add koa @koa/router koa2-formidable ``` Afterwards, follow one of the examples below. @@ -61,7 +61,7 @@ start() Install additional dependencies: ```bash -$ yarn add -D @types/koa +yarn add -D @types/koa ``` {% code title="app.ts" %} @@ -165,7 +165,7 @@ As you may have noticed, the `authenticate` function compares credentials you su Install additional dependencies: ```bash -$ yarn add -D @types/koa +yarn add -D @types/koa ``` {% code title="app.ts" %} diff --git a/installation/plugins/nest.md b/installation/plugins/nest.md index fa62b42..adc8649 100644 --- a/installation/plugins/nest.md +++ b/installation/plugins/nest.md @@ -19,7 +19,7 @@ Example repository with AdminJS v7 working with NestJS & ESM:\ Make sure you have installed AdminJS packages described in [Getting started](../getting-started.md) article. ```bash -$ yarn add adminjs @adminjs/nestjs +yarn add adminjs @adminjs/nestjs ``` {% endhint %} @@ -29,15 +29,15 @@ As of version `5.x.x` of `@adminjs/nestjs`, the plugin only supports Nest server If you are starting a new project, install `nest-cli` and bootstrap the project: ```bash -$ npm i -g @nestjs/cli -$ nest new +npm i -g @nestjs/cli +nest new ``` {% endhint %} `@adminjs/nestjs` uses `@adminjs/express` to set up AdminJS, because of this you have to additionally install it's dependencies: ```bash -$ yarn add @adminjs/express express-session express-formidable +yarn add @adminjs/express express-session express-formidable ``` Set `moduleResolution` to `nodenext` or `node16` in your `tsconfig.json`: @@ -106,7 +106,7 @@ export class AppModule {} Now you should be able to start your AdminJS application: ```bash -$ nest start +nest start ``` AdminJS panel will be available under `http://localhost:3000/admin` if you have followed this example thoroughly. diff --git a/tutorials/custom-components-library.md b/tutorials/custom-components-library.md index fff3a85..2e374e7 100644 --- a/tutorials/custom-components-library.md +++ b/tutorials/custom-components-library.md @@ -7,7 +7,7 @@ description: '@adminjs/custom-components' If standard library components are not enough there is available library with custom ones. It is growing continuously to fulfill various users needs. ```shell -$ yarn add @adminjs/custom-components +yarn add @adminjs/custom-components ``` Usage is similar to using [own components](broken-reference) instead writing own component just import one from library.