Permalink
Browse files

Created a build routine for releases. Run grunt release to create a n…

…ew zip. Updated gitignore and packages. Run NPM update.
  • Loading branch information...
cdevroe committed Oct 12, 2016
1 parent 501cafb commit 1245d6f23ba19eae78b9d1558ef1dedfb6dfc8cc
Showing with 36 additions and 1 deletion.
  1. +3 −0 .gitignore
  2. +31 −1 Gruntfile.js
  3. +2 −0 package.json
View
@@ -26,3 +26,6 @@ assets/css/*.css.map
assets/css/unmark.css
assets/css/unmark_welcome.css
assets/js/production/*.js
# Release build
release*
View
@@ -81,6 +81,34 @@ module.exports = function(grunt) {
files: js_file_config
}
},
copy: {
release: {
files: [
{expand: true, flatten: false, src: ['application/**'], dest: 'release/unmark/'},
{expand: true, flatten: false, src: ['assets/css/*.css'], dest: 'release/unmark/'},
{expand: true, flatten: false, src: ['assets/images/**'], dest: 'release/unmark/'},
{expand: true, flatten: false, src: ['assets/js/production/*.js'], dest: 'release/unmark/'},
{expand: true, flatten: false, src: ['assets/js/templates/*.js'], dest: 'release/unmark/'},
{expand: true, flatten: false, src: ['assets/touch_icons/*.png'], dest: 'release/unmark/'},
{expand: false, flatten: true, src: ['assets/.htaccess'], dest: 'release/unmark/assets/.htaccess'},
{expand: true, flatten: false, src: ['bookmarklets/*.js'], dest: 'release/unmark/'},
{expand: true, flatten: false, src: ['custom_example/**'], dest: 'release/unmark/'},
{expand: true, flatten: false, src: ['system/**'], dest: 'release/unmark/'},
{expand: false, flatten: true, src: ['.htaccess'], dest: 'release/unmark/.htaccess'},
{expand: true, flatten: true, src: ['*', '!Gruntfile.js', '!.DS_Store', '!.gitignore', '!package.json'], dest: 'release/unmark/', filter: 'isFile'}
]
}
},
compress: {
dist: {
options: {
archive: 'release/unmark.zip'
},
files: [
{src: ['release/unmark/**'] }
]
}
},
watch: {
scripts: {
files: ['assets/js/*.js'],
@@ -105,8 +133,10 @@ module.exports = function(grunt) {
// Load the Tasks
require('load-grunt-tasks')(grunt);
// Register Tasks
grunt.registerTask('default', [ 'sass:prod', 'uglify:prod' ]); // Default Build for OS Project
grunt.registerTask('release', [ 'sass:prod', 'uglify:prod', 'copy:release', 'compress' ]); // Build for OS release
grunt.registerTask('dev', [ 'sass:prod', 'concat:dev', 'concat:custom' ]); // Dev build
grunt.registerTask('production', [ 'sass:prod', 'uglify:prod', 'uglify:custom' ]); // Default Production Build
View
@@ -10,6 +10,8 @@
"grunt-contrib-sass": "~0.7.2",
"grunt-contrib-uglify": "~0.8.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-compress": "~0.6.0",
"glob": "~3.2.8",
"grunt-contrib-concat": "~0.3.0"
}

0 comments on commit 1245d6f

Please sign in to comment.