Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Add v3.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickRe committed Apr 7, 2020
1 parent 95b2856 commit 3218606
Show file tree
Hide file tree
Showing 88 changed files with 2,723 additions and 2,637 deletions.
78 changes: 38 additions & 40 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ require('./core/server/overrides');
const config = require('./core/server/config');
const urlService = require('./core/frontend/services/url');
const _ = require('lodash');
const chalk = require('chalk');
const fs = require('fs-extra');
const KnexMigrator = require('knex-migrator');
const knexMigrator = new KnexMigrator({
Expand All @@ -35,9 +34,19 @@ const logBuildingClient = function (grunt) {
// ## Grunt configuration
const configureGrunt = function (grunt) {
// #### Load all grunt tasks
//
// Find all of the task which start with `grunt-` and load them, rather than explicitly declaring them all
require('matchdep').filterDev(['grunt-*', '!grunt-cli']).forEach(grunt.loadNpmTasks);
grunt.loadNpmTasks('@lodder/grunt-postcss');
grunt.loadNpmTasks('grunt-bg-shell');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-symlink');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-express-server');
grunt.loadNpmTasks('grunt-mocha-cli');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-subgrunt');
grunt.loadNpmTasks('grunt-update-submodules');

var cfg = {
// #### Common paths used by tasks
Expand Down Expand Up @@ -123,20 +132,20 @@ const configureGrunt = function (grunt) {

unit: {
src: [
'core/test/unit/**/*_spec.js'
'test/unit/**/*_spec.js'
]
},

acceptance: {
src: [
'core/test/api-acceptance/**/*_spec.js',
'core/test/frontend-acceptance/**/*_spec.js'
'test/api-acceptance/**/*_spec.js',
'test/frontend-acceptance/**/*_spec.js'
]
},

regression: {
src: [
'core/test/regression/**/*_spec.js'
'test/regression/**/*_spec.js'
]
},

Expand Down Expand Up @@ -276,10 +285,12 @@ const configureGrunt = function (grunt) {
}
},

cssnano: {
postcss: {
prod: {
options: {
sourcemap: false
processors: [
require('cssnano')() // minify the result
]
},
files: {
'core/server/public/ghost.min.css': 'core/server/public/ghost.css'
Expand Down Expand Up @@ -383,17 +394,17 @@ const configureGrunt = function (grunt) {
//
// `grunt test:unit/apps_spec.js` will run just the tests inside the apps_spec.js file
//
// It works for any path relative to the core/test folder. It will also run all the tests in a single directory
// You can also run a test with grunt test:core/test/unit/... to get bash autocompletion
// It works for any path relative to the /test/ folder. It will also run all the tests in a single directory
// You can also run a test with grunt test:test/unit/... to get bash autocompletion
//
// `grunt test:regression/api` - runs the api regression tests
grunt.registerTask('test', 'Run a particular spec file from the core/test directory e.g. `grunt test:unit/apps_spec.js`', function (test) {
grunt.registerTask('test', 'Run a particular spec file from the /test/ directory e.g. `grunt test:unit/apps_spec.js`', function (test) {
if (!test) {
grunt.fail.fatal('No test provided. `grunt test` expects a filename. e.g.: `grunt test:unit/apps_spec.js`. Did you mean `npm test` or `grunt validate`?');
}

if (!test.match(/core\/test/) && !test.match(/core\/server/)) {
test = 'core/test/' + test;
if (!test.match(/test\//) && !test.match(/core\/server/)) {
test = 'test/' + test;
}

// CASE: execute folder
Expand Down Expand Up @@ -476,21 +487,6 @@ const configureGrunt = function (grunt) {
['test-setup', 'mochacli:acceptance']
);

// #### Master Warning *(Utility Task)*
// Warns git users not ot use the `master` branch in production.
// `master` is an unstable branch and shouldn't be used in production as you run the risk of ending up with a
// database in an unrecoverable state. Instead there is a branch called `stable` which is the equivalent of the
// release zip for git users.
grunt.registerTask('master-warn',
'Outputs a warning to runners of grunt prod, that master shouldn\'t be used for live blogs',
function () {
grunt.log.writeln(chalk.red(
'Use the ' + chalk.bold('stable') + ' branch for live blogs. '
+ chalk.bold.underline('Never') + ' master!'
));
grunt.log.writeln('>', 'Always two there are, no more, no less. A master and a ' + chalk.bold('stable') + '.');
});

// ## Building assets
//
// Ghost's GitHub repository contains the un-built source code for Ghost. If you're looking for the already
Expand Down Expand Up @@ -542,7 +538,7 @@ const configureGrunt = function (grunt) {
//
// It is otherwise the same as running `grunt`, but is only used when running Ghost in the `production` env.
grunt.registerTask('prod', 'Build JS & templates for production',
['subgrunt:prod', 'uglify:prod', 'cssnano:prod', 'master-warn']);
['subgrunt:prod', 'uglify:prod', 'postcss:prod']);

// ### Live reload
// `grunt dev` - build assets on the fly whilst developing
Expand Down Expand Up @@ -584,7 +580,6 @@ const configureGrunt = function (grunt) {
grunt.registerTask('release',
'Release task - creates a final built zip\n' +
' - Do our standard build steps \n' +
' - Run all tests(acceptance + regression + unit) \n' +
' - Copy files to release-folder/#/#{version} directory\n' +
' - Clean out unnecessary files (travis, .git*, etc)\n' +
' - Zip files in release-folder to dist-folder/#{version} directory',
Expand All @@ -608,14 +603,17 @@ const configureGrunt = function (grunt) {
dest: 'core/server/web/admin/views/default.html'
}]
});
if (!grunt.option('skip-tests')) {
grunt.task.run(['update_submodules:pinned', 'subgrunt:init', 'test-all', 'clean:built', 'clean:tmp', 'prod', 'clean:release', 'copy:admin_html', 'copy:release', 'compress:release']);
} else {
grunt.log.writeln(chalk.red(
chalk.bold('Skipping tests...')
));
grunt.task.run(['update_submodules:pinned', 'subgrunt:init', 'clean:built', 'clean:tmp', 'prod', 'clean:release', 'copy:admin_html', 'copy:release', 'compress:release']);
}

grunt.task
.run('update_submodules:pinned')
.run('subgrunt:init')
.run('clean:built')
.run('clean:tmp')
.run('prod')
.run('clean:release')
.run('copy:admin_html')
.run('copy:release')
.run('compress:release');
}
);
};
Expand Down
34 changes: 12 additions & 22 deletions azuredeploy.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.2",
"parameters": {
"siteName": {
Expand All @@ -14,11 +14,13 @@
"sku": {
"type": "string",
"allowedValues": [
"Free",
"Shared",
"Basic",
"Standard",
"Premium"
],
"defaultValue": "Basic"
"defaultValue": "Free"
},
"Worker Size": {
"type": "string",
Expand Down Expand Up @@ -72,7 +74,7 @@
"name": "[parameters('hostingPlanName')]",
"type": "Microsoft.Web/serverfarms",
"location": "[parameters('siteLocation')]",
"apiVersion": "2018-02-01",
"apiVersion": "2016-09-01",
"sku": {
"name": "[variables('sku')]"
},
Expand All @@ -86,7 +88,7 @@
"name": "[parameters('siteName')]",
"type": "Microsoft.Web/sites",
"location": "[parameters('siteLocation')]",
"apiVersion": "2018-11-01",
"apiVersion": "2016-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
],
Expand All @@ -99,25 +101,13 @@
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
},
"resources": [
{
"apiVersion": "2018-11-01",
"name": "web",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('siteName'))]"
],
"properties": {
"use32BitWorkerProcess": false,
"httpsOnly": true,
"alwaysOn": true
}
},
{
"name": "appsettings",
"type": "config",
"apiVersion": "2018-11-01",
"apiVersion": "2016-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('siteName'))]",
"[resourceId('Microsoft.Web/sites/sourcecontrols', parameters('siteName'), 'web')]",
"[resourceId('Microsoft.Insights/components', variables('appInsightsName'))]"
],
"properties": {
Expand All @@ -127,18 +117,18 @@
"mail__options__auth__user": "[parameters('Email Username')]",
"mail__options__auth__pass": "[parameters('Email Password')]",
"mail__from": "[parameters('Email From Address')]",
"WEBSITE_NODE_DEFAULT_VERSION": "~10",
"WEBSITE_NODE_DEFAULT_VERSION": "10.15.2",
"npm_config_arch": "x64",
"NODE_ENV": "production",
"APPINSIGHTS_INSTRUMENTATION_KEY": "[reference(concat('Microsoft.Insights/components/', variables('appInsightsName'))).InstrumentationKey]"
}
},
{
"name": "web",
"type": "sourcecontrols",
"apiVersion": "2018-11-01",
"apiVersion": "2016-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('siteName'))]",
"[resourceId('Microsoft.Web/sites/config', parameters('siteName'), 'appsettings')]"
"[resourceId('Microsoft.Web/sites', parameters('siteName'))]"
],
"properties": {
"repoUrl": "[parameters('repoUrl')]",
Expand Down
2 changes: 1 addition & 1 deletion content/themes/casper/assets/built/casper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3218606

Please sign in to comment.