Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverted "✨ Added v4 spec support as "canary" and set "latest" to… #253

Merged
merged 1 commit into from
Sep 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ To run a local zip file through the checks:

`gscan /path/to/theme.zip -z`

By default, GScan scans themes for the latest Ghost version compatibility. You can also specify a Ghost version by using the following parameters (for Ghost 1.0, 2.0, 3.0 and 4.0):
By default, GScan scans themes for the latest Ghost version compatibility. You can also specify a Ghost version by using the following parameters (for Ghost 1.0, 2.0 and 3.0):

`--v1` or `-1`
`--v2` or `-2`
`--v3` or `-3`
`--v4` or `-4`

Use the `--canary` parameter to check for the upcoming Ghost version.

Expand All @@ -62,9 +61,9 @@ gscan.checkZip({
path: 'path-to-zip',
// if you need to check the theme for a different
// major Ghost version, you can pass it. Currently
// v1, v2, v3 and v4 are supported. Default is
// the latest Ghost version 3.0:
// checkVersion: 'v3',
// v1, which is Ghost 1.0 is supported. Default is
// the latest Ghost version 2.0:
// checkVersion: 'v1',
name: 'my-theme'
}).then(function (result) {
console.log(result);
Expand Down
5 changes: 2 additions & 3 deletions app/tpl/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
<span class="gh-input-icon select-arrow">{{> icon-arrow-up}}</span>
<span class="gh-input-icon select-arrow active">{{> icon-arrow-down}}</span>
<select class="gh-input gh-select" name="version" id="version">
<option value="v4">{{ghostVersions.v4.major}} (canary)</option>
<option value="v3" selected>{{ghostVersions.v3.major}} (latest)</option>
<option value="v2">{{ghostVersions.v2.major}}</option>
<option value="v3">{{ghostVersions.v3.major}} (canary)</option>
<option value="v2" selected>{{ghostVersions.v2.major}} (latest)</option>
<option value="v1">{{ghostVersions.v1.major}}</option>
</select>
</div>
Expand Down
2 changes: 0 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ prettyCLI
options.checkVersion = 'v2';
} else if (argv.v3) {
options.checkVersion = 'v3';
} else if (argv.v4) {
options.checkVersion = 'v4';
} else if (argv.canary) {
options.checkVersion = 'canary';
} else {
Expand Down
6 changes: 3 additions & 3 deletions lib/checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ const checks = requireDir('./checks');
const checker = function checkAll(themePath, options) {
options = options || {};

const passedVersion = _.get(options, 'checkVersion', 'v3');
const passedVersion = _.get(options, 'checkVersion', 'v2');
let version = passedVersion;

if (passedVersion === 'latest') {
version = 'v3';
version = 'v2';
} else if (passedVersion === 'canary') {
version = 'v4';
version = 'v3';
}

return readTheme(themePath)
Expand Down
4 changes: 2 additions & 2 deletions lib/specs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ module.exports = {
let [version] = key;

if (version === 'latest') {
version = 'v3';
version = 'v2';
} else if (version === 'canary') {
version = 'v4';
version = 'v3';
}

debug('Checking against version: ', version);
Expand Down
34 changes: 0 additions & 34 deletions lib/specs/v4.js

This file was deleted.

26 changes: 11 additions & 15 deletions lib/utils/versions.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
{
"v1": {
"major": "1.x",
"docs": "1.25.0"
},
"v2": {
"major": "2.x",
"docs": "2.1.0"
},
"v3": {
"major": "3.x",
"docs": "3.0.0"
},
"v4": {
"major": "4.x",
"docs": "4.0.0"
"v1": {
"major": "1.x",
"docs": "1.25.0"
},
"v2": {
"major": "2.x",
"docs": "2.1.0"
},
"v3": {
"major": "3.x",
"docs": "3.0.0"
}
}
Loading