mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
🐛 move overrides into core folder (#7371)
closes #7336 - make sure overrides is still the first package to call
This commit is contained in:
parent
470000242d
commit
94fdbdd267
@ -1,6 +1,17 @@
|
||||
// # Bootup
|
||||
// This file needs serious love & refactoring
|
||||
|
||||
/**
|
||||
* make sure overrides get's called first!
|
||||
* - keeping the overrides require here works for installing Ghost as npm!
|
||||
*
|
||||
* the call order is the following:
|
||||
* - root index requires core module
|
||||
* - core index requires server
|
||||
* - overrides is the first package to load
|
||||
*/
|
||||
require('./overrides');
|
||||
|
||||
// Module dependencies
|
||||
var express = require('express'),
|
||||
_ = require('lodash'),
|
||||
|
@ -1,12 +1,4 @@
|
||||
var moment = require('moment-timezone'),
|
||||
_ = require('lodash'),
|
||||
toPairs = require('lodash.topairs'),
|
||||
fromPairs = require('lodash.frompairs'),
|
||||
toString = require('lodash.tostring'),
|
||||
pickBy = require('lodash.pickby'),
|
||||
uniqBy = require('lodash.uniqby'),
|
||||
orderBy = require('lodash.orderby'),
|
||||
omitBy = require('lodash.omitby');
|
||||
var moment = require('moment-timezone');
|
||||
|
||||
/**
|
||||
* force UTC
|
||||
@ -17,6 +9,16 @@ var moment = require('moment-timezone'),
|
||||
*/
|
||||
moment.tz.setDefault('UTC');
|
||||
|
||||
// jscs:disable
|
||||
var _ = require('lodash'),
|
||||
toPairs = require('lodash.topairs'),
|
||||
fromPairs = require('lodash.frompairs'),
|
||||
toString = require('lodash.tostring'),
|
||||
pickBy = require('lodash.pickby'),
|
||||
uniqBy = require('lodash.uniqby'),
|
||||
orderBy = require('lodash.orderby'),
|
||||
omitBy = require('lodash.omitby');
|
||||
|
||||
/**
|
||||
* lodash 4.x functions we use
|
||||
*/
|
||||
|
19
index.js
19
index.js
@ -1,25 +1,14 @@
|
||||
// # Ghost Startup
|
||||
// Orchestrates the startup of Ghost when run from command line.
|
||||
|
||||
var express,
|
||||
ghost,
|
||||
parentApp,
|
||||
errors;
|
||||
|
||||
require('./core/server/overrides');
|
||||
var ghost = require('./core'),
|
||||
express = require('express'),
|
||||
errors = require('./core/server/errors'),
|
||||
parentApp = express();
|
||||
|
||||
// Make sure dependencies are installed and file system permissions are correct.
|
||||
require('./core/server/utils/startup-check').check();
|
||||
|
||||
// Proceed with startup
|
||||
express = require('express');
|
||||
ghost = require('./core');
|
||||
errors = require('./core/server/errors');
|
||||
|
||||
// Create our parent express app instance.
|
||||
parentApp = express();
|
||||
|
||||
// Call Ghost to get an instance of GhostServer
|
||||
ghost().then(function (ghostServer) {
|
||||
// Mount our Ghost instance on our desired subdirectory path if it exists.
|
||||
parentApp.use(ghostServer.config.paths.subdir, ghostServer.rootApp);
|
||||
|
Loading…
Reference in New Issue
Block a user