File: /var/www/vhosts/miroglu.net/httpdocs/wp-content/themes/the-landscaper/Gruntfile.js
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pgk: grunt.file.readJSON( 'package.json' ),
// https://github.com/gruntjs/grunt-contrib-watch
watch: {
css: {
files: ['assets/sass/**/*.scss'],
tasks: ['sass']
},
},
// https://github.com/sindresorhus/grunt-sass
sass: {
dist: {
options: {
style: 'expanded',
sourcemap: 'none',
},
files: {
'style.css': 'assets/sass/style.scss',
'assets/css/woocommerce.css': 'assets/sass/woocommerce.scss',
'assets/css/bootstrap.css': 'assets/sass/bootstrap.scss',
'assets/css/editor-style.css': 'assets/sass/editor-style.scss',
}
}
},
cssflip: {
your_target: {
options: {},
files: {
'style-rtl.css': 'style.css',
'assets/css/bootstrap-rtl.css': 'assets/css/bootstrap.css',
'assets/css/woocommerce-rtl.css': 'assets/css/woocommerce.css',
},
}
},
// https://github.com/gruntjs/grunt-contrib-jshint
jshint: {
options: {
"bitwise": true,
"browser": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"es5": true,
"esnext": true,
"immed": true,
"jquery": true,
"latedef": true,
"newcap": true,
"noarg": true,
"node": true,
"strict": false,
"undef": true,
"globals": {
"jQuery": true,
"alert": true,
"google": true,
"InfoBox": true,
"themeajax": true,
"ajaxurl": true,
"Favico": true,
"BackgroundCheck": true,
"smoothScroll": true
}
}
},
copy: {
main: {
expand: true,
dot: false,
flatten: false,
src: [
'*.css',
'*.php',
'Gruntfile.js',
'package.json',
'bower.json',
'wpml-config.xml',
'screenshot.{jpg,png}',
'readme.txt',
'assets/**',
'bundled-plugins/**',
'bower_components/bootstrap-sass/assets/**',
'bower_components/fontawesome/css/font-awesome.min.css',
'bower_components/fontawesome/fonts/**',
'bower_components/almond/almond.js',
'bower_components/requirejs/require.js',
'demo-files/**',
'headers/**',
'inc/**',
'languages/**',
'loop/**',
'parts/**',
'woocommerce/**',
],
dest: 'the-landscaper/',
},
},
compress: {
main: {
options: {
archive: 'the-landscaper.zip',
mode: 'zip'
},
src: 'the-landscaper/**'
}
},
// https://github.com/gruntjs/grunt-contrib-requirejs
requirejs: {
compile: {
options: {
baseUrl: '',
mainConfigFile: 'assets/js/main.js',
optimize: 'uglify2',
preserveLicenseComments: false,
wrap: true,
useStrict: true,
name: 'bower_components/almond/almond',
include: 'assets/js/main',
out: 'assets/js/main.min.js'
}
}
},
makepot: {
target: {
options: {
domainPath: '/languages/',
potFilename: 'thelandscaper.pot',
type: 'wp-theme',
exclude: [
'inc/tgmpa/.*',
'inc/tgm-plugin-activation.*',
'node_modules/.*',
'bower_components/.*',
'bundled-plugins/.*',
]
}
}
},
});
// Load the Grunt plugins.
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-css-flip');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-wp-i18n');
// Register the default tasks.
grunt.registerTask( 'default', ['watch']);
grunt.registerTask( 'package', ['copy', 'compress'] );
grunt.registerTask( 'build', ['makepot', 'sass', 'copy', 'compress'] );
};