mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Refactore theme engine resolution module
refs 0f59537b96
refs https://github.com/TryGhost/Team/issues/221
- Makes it one less place to update the default api-engine version in the future
This commit is contained in:
parent
30fcf8de2e
commit
48d36d1e33
1 changed files with 1 additions and 4 deletions
|
@ -7,15 +7,12 @@ const allowedKeys = ['ghost-api'];
|
|||
/**
|
||||
* Valid definitions for "ghost-api":
|
||||
*
|
||||
* ^0.1
|
||||
* ^2
|
||||
* ^0.1.0
|
||||
* ^2.0.0
|
||||
* 2.0.0
|
||||
* v4
|
||||
* v3
|
||||
* v2
|
||||
* v0.1
|
||||
* canary
|
||||
*
|
||||
* Goal: Extract major version from input.
|
||||
|
@ -44,7 +41,7 @@ module.exports = (packageJson) => {
|
|||
if (availableApiVersions[apiVersionMajor]) {
|
||||
packageJson.engines['ghost-api'] = availableApiVersions[apiVersionMajor];
|
||||
} else {
|
||||
packageJson.engines['ghost-api'] = 'v4';
|
||||
packageJson.engines['ghost-api'] = DEFAULTS['ghost-api'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue