0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Update to release process

- Release does all init & prod tasks necessary to create a full build
- Don't create or include .map files
- Don't include pre-minified prod files
- Don't include export .json files
- Don't include client/html
This commit is contained in:
Hannah Wolfe 2014-08-04 22:12:23 +01:00
parent 89389b3673
commit 8bfbf13248
2 changed files with 24 additions and 6 deletions

View file

@ -10,9 +10,10 @@ content/themes/**
!content/themes/casper/**
content/apps/**
!content/apps/README.md
content/data/**
!content/data/README.md
node_modules/**
core/test/**
core/server/data/export/exported*
**/*.db*
*.db*
.sass*
@ -24,6 +25,8 @@ core/server/data/export/exported*
config.js
core/client/config-dev.js
core/client/config-prod.js
core/client/html/**
core/built/**/*.map
CONTRIBUTING.md
SECURITY.md
.travis.yml

View file

@ -344,7 +344,13 @@ var path = require('path'),
src: ['core/built/**']
},
release: {
src: ['<%= paths.releaseBuild %>/**']
src: [
'<%= paths.releaseBuild %>/**',
'core/built/public/jquery.js',
'core/built/scripts/vendor.js',
'core/built/scripts/templates.js',
'core/built/scripts/ghost.js'
]
},
test: {
src: ['content/data/ghost-test.db']
@ -503,7 +509,17 @@ var path = require('path'),
uglify: {
prod: {
options: {
sourceMap: true,
sourceMap: true
},
files: {
'core/built/public/jquery.min.js': 'core/built/public/jquery.js',
'core/built/scripts/vendor.min.js': 'core/built/scripts/vendor.js',
'core/built/scripts/ghost.min.js': 'core/built/scripts/ghost.js'
}
},
release: {
options: {
sourceMap: false
},
files: {
'core/built/public/jquery.min.js': 'core/built/public/jquery.js',
@ -852,7 +868,7 @@ var path = require('path'),
//
// 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',
['concat:prod', 'copy:prod', 'emberBuildProd', 'uglify', 'master-warn']);
['concat:prod', 'copy:prod', 'emberBuildProd', 'uglify:prod', 'master-warn']);
// ### Default asset build
// `grunt` - default grunt task
@ -887,8 +903,7 @@ var path = require('path'),
' - 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',
['shell:bower', 'update_submodules', 'concat', 'emberBuildDev',
'emberBuildProd', 'uglify', 'clean:release', 'copy:release', 'compress:release']);
['init', 'concat:prod', 'copy:prod', 'emberBuildProd', 'uglify:release', 'clean:release', 'copy:release', 'compress:release']);
};
// Export the configuration