mirror of
https://github.com/strapi/strapi.git
synced 2025-10-26 23:51:10 +00:00
Merge branch 'master' into fix/doc_error
This commit is contained in:
commit
e29dc8ce75
@ -6,7 +6,7 @@ Strapi comes with a full featured Command Line Interface (CLI) which lets you sc
|
||||
|
||||
## strapi new
|
||||
|
||||
Create a new project
|
||||
Create a new project.
|
||||
|
||||
```bash
|
||||
strapi new <name>
|
||||
@ -33,33 +33,33 @@ options: [--debug|--quickstart|--dbclient=<dbclient> --dbhost=<dbhost> --dbport=
|
||||
|
||||
## strapi develop|dev
|
||||
|
||||
Start a Strapi application with autoReload activated.
|
||||
Start a Strapi application with autoReload enabled.
|
||||
|
||||
Strapi modifies/creates files at runtime and needs to restart when new files are created. To achieve this, `strapi develop` adds a file watcher and restarts the application when necessary.
|
||||
|
||||
::: note
|
||||
You should never use this command to run a Strapi application in production
|
||||
You should never use this command to run a Strapi application in production.
|
||||
:::
|
||||
|
||||
## strapi start
|
||||
|
||||
Start a Strapi application without autoReloading.
|
||||
Start a Strapi application with autoReload disabled.
|
||||
|
||||
This commands is there to run a Strapi application without restarts and file writes (aimed at production usage).
|
||||
When run certain features are disabled because they require application restarts.
|
||||
Certain features are disabled in the `strapi start` mode because they require application restarts.
|
||||
|
||||
::: note
|
||||
You can specify a NODE_ENV to use the configurations in the `./config/envrionments` folder (e.g development|staging|production)
|
||||
By default the `development` envrionment will be used
|
||||
You can specify a NODE_ENV to use the configurations in the `./config/environments/[development|staging|production]` folder.
|
||||
By default the `development` envrionment will be used.
|
||||
:::
|
||||
|
||||
## strapi build
|
||||
|
||||
Builds your admin panel
|
||||
Builds your admin panel.
|
||||
|
||||
::: note
|
||||
You can specify a NODE_ENV to use the configurations in the `./config/envrionments` folder (e.g development|staging|production)
|
||||
By default the `development` envrionment will be used
|
||||
You can specify a NODE_ENV to use the configurations in the `./config/environments/[development|staging|production]` folder.
|
||||
By default the `development` envrionment will be used.
|
||||
:::
|
||||
|
||||
## strapi generate:api
|
||||
@ -96,7 +96,7 @@ The first letter of the filename will be uppercased.
|
||||
|
||||
## strapi generate:controller
|
||||
|
||||
Create a new controller
|
||||
Create a new controller.
|
||||
|
||||
```bash
|
||||
strapi generate:controller <name>
|
||||
@ -123,7 +123,7 @@ The first letter of the filename will be uppercased.
|
||||
|
||||
## strapi generate:model
|
||||
|
||||
Create a new model
|
||||
Create a new model.
|
||||
|
||||
```bash
|
||||
strapi generate:model <name> [<attribute:type>]
|
||||
@ -159,7 +159,7 @@ The first letter of the filename will be uppercased.
|
||||
|
||||
## strapi generate:service
|
||||
|
||||
Create a new service
|
||||
Create a new service.
|
||||
|
||||
```bash
|
||||
strapi generate:service <name>
|
||||
@ -186,7 +186,7 @@ The first letter of the filename will be uppercased.
|
||||
|
||||
## strapi generate:policy
|
||||
|
||||
Create a new policy
|
||||
Create a new policy.
|
||||
|
||||
```bash
|
||||
strapi generate:policy <name>
|
||||
|
||||
@ -10,7 +10,6 @@ const path = require('path');
|
||||
const _ = require('lodash');
|
||||
const moment = require('moment');
|
||||
const pathToRegexp = require('path-to-regexp');
|
||||
const settings = require('../config/settings.json');
|
||||
const defaultComponents = require('./utils/components.json');
|
||||
const form = require('./utils/forms.json');
|
||||
const parametersOptions = require('./utils/parametersOptions.json');
|
||||
@ -494,7 +493,7 @@ module.exports = {
|
||||
const apisDoc = this.retrieveDocumentationFiles(false, version);
|
||||
const pluginsDoc = this.retrieveDocumentationFiles(true, version);
|
||||
const appDoc = [...apisDoc, ...pluginsDoc];
|
||||
const defaultSettings = _.cloneDeep(settings);
|
||||
const defaultSettings = _.cloneDeep(strapi.plugins.documentation.config);
|
||||
_.set(defaultSettings, ['info', 'x-generation-date'], moment().format('L LTS'));
|
||||
_.set(defaultSettings, ['info', 'version'], version);
|
||||
const tags = appDoc.reduce((acc, current) => {
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
const http = require('http');
|
||||
const path = require('path');
|
||||
const { EventEmitter } = require('events');
|
||||
const fse = require('fs-extra');
|
||||
const Koa = require('koa');
|
||||
const _ = require('lodash');
|
||||
const { logger, models } = require('strapi-utils');
|
||||
@ -102,6 +103,17 @@ class Strapi extends EventEmitter {
|
||||
this.fs = createStrapiFs(this);
|
||||
}
|
||||
|
||||
requireProjectBootstrap() {
|
||||
const bootstrapPath = path.resolve(
|
||||
this.dir,
|
||||
'config/functions/bootstrap.js'
|
||||
);
|
||||
|
||||
if (fse.existsSync(bootstrapPath)) {
|
||||
require(bootstrapPath);
|
||||
}
|
||||
}
|
||||
|
||||
async start(cb) {
|
||||
try {
|
||||
// Emit starting event.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user