mirror of
https://github.com/strapi/strapi.git
synced 2025-07-27 10:56:36 +00:00
28 lines
598 B
JavaScript
28 lines
598 B
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
/**
|
||
|
* Module dependencies
|
||
|
*/
|
||
|
|
||
|
// Public node modules.
|
||
|
const _ = require('lodash');
|
||
|
|
||
|
// Local dependencies.
|
||
|
const Strapi = require('./Strapi');
|
||
|
|
||
|
/**
|
||
|
* Expose `Strapi` factory
|
||
|
* (maintains backwards compatibility with constructor usage).
|
||
|
*/
|
||
|
|
||
|
module.exports = strapiFactory;
|
||
|
|
||
|
function strapiFactory() {
|
||
|
return new Strapi();
|
||
|
}
|
||
|
|
||
|
// Backwards compatibility for Strapi singleton usage.
|
||
|
const singleton = strapiFactory();
|
||
|
strapiFactory.isLocalStrapiValid = _.bind(singleton.isLocalStrapiValid, singleton);
|
||
|
strapiFactory.isStrapiAppSync = _.bind(singleton.isStrapiAppSync, singleton);
|