mirror of
https://github.com/strapi/strapi.git
synced 2025-07-25 18:05:07 +00:00
28 lines
598 B
JavaScript
Executable File
28 lines
598 B
JavaScript
Executable File
'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);
|