Got this weird one on my gruntfile while processing images using spritesmith.. anyone every come across this ?
Heres my gruntfile.. nothing too major but the issue arises when it comes to the sprite generation... im guessing its a memory problem
module.exports = function(grunt) {
var globalConfig = { siteName: 'mysite', };
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
globalConfig: globalConfig, // my variables inititalized here
/* WATCH Configuration */
watch: {
js: {
files: ['wp-content/themes/<%= globalConfig.siteName %>/assets/libs/js/plugins/**/*.js','wp-content/themes/<%= globalConfig.siteName %>/assets/js/app.js'],
tasks: ['concat:dist', 'uglify:dist'],
},
sprite: {
files: ['wp-content/themes/<%= globalConfig.siteName %>/assets/libs/sprite/*.png'],
tasks: ['sprite:dist'],
},
sass: {
files: ['wp-content/themes/<%= globalConfig.siteName %>/assets/css/**/*.scss'],
tasks: ['sass:dist']
},
livereload: {
files: [
'wp-content/themes/<%= globalConfig.siteName %>/*.html',
'wp-content/themes/<%= globalConfig.siteName %>/*.php',
'wp-content/themes/<%= globalConfig.siteName %>/partials/*.php',
'wp-content/themes/<%= globalConfig.siteName %>/functions/*.php',
'wp-content/themes/<%= globalConfig.siteName %>/assets/js/*.{js,json}',
'wp-content/themes/<%= globalConfig.siteName %>/assets/css/**/*.{scss,css}',
'wp-content/themes/<%= globalConfig.siteName %>/assets/images/*.{png,jpg,jpeg,gif,webp,svg}'
],
options: {
livereload: true
}
}
},
/* SASS Configuration */
sass: {
options: {
sourceMap: true,
outputStyle: 'compressed',
},
dist: {
files: {
'wp-content/themes/<%= globalConfig.siteName %>/style.css': 'wp-content/themes/<%= globalConfig.siteName %>/assets/css/main.scss'
}
}
},
/* UGLIFY Configuration */
uglify: {
options: {
mangle: false
},
dist: {
files: {
'wp-content/themes/<%= globalConfig.siteName %>/assets/js/production.min.js': ['wp-content/themes/<%= globalConfig.siteName %>/assets/js/production.js']
}
}
},
/* CONCAT Configuration */
concat: {
options: {
separator: ';',
},
dist: {
src: [
'wp-content/themes/<%= globalConfig.siteName %>/assets/libs/js/plugins/modernizr.js',
'wp-content/themes/<%= globalConfig.siteName %>/assets/libs/js/plugins/html5shiv.js',
'wp-content/themes/<%= globalConfig.siteName %>/assets/libs/js/plugins/jquery.fancybox.js',
'wp-content/themes/<%= globalConfig.siteName %>/assets/libs/js/plugins/jquery.fancybox-media.js',
'wp-content/themes/<%= globalConfig.siteName %>/assets/libs/js/plugins/slick.js',
'wp-content/themes/<%= globalConfig.siteName %>/assets/libs/js/plugins/jquery.mixitup.js',
'wp-content/themes/<%= globalConfig.siteName %>/assets/js/app.js'
],
dest: 'wp-content/themes/<%= globalConfig.siteName %>/assets/js/production.js',
},
},
sprite:{
dist: {
src: 'wp-content/themes/<%= globalConfig.siteName %>/assets/libs/sprite/*.png',
dest: 'wp-content/themes/<%= globalConfig.siteName %>/assets/sprite.png',
destCss: 'wp-content/themes/<%= globalConfig.siteName %>/assets/sprite.css'
}
}
});
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-spritesmith');
grunt.registerTask('default', ['sass:dist', 'concat:dist', 'uglify:dist','sprite:dist', 'watch'] );
// grunt.registerTask('dev-watch', ['concat:dist', 'uglify']);
};