Skip to content

Instantly share code, notes, and snippets.

Last active Apr 3, 2016
What would you like to do?
Sitecore Web Forms for Marketers Gruntfile
// Gruntfile configuration v0.0.1
module.exports = function (grunt) {
// load nod tasks from package.json
// show timing of build tasks
// just in time load tasks / faster task running times
customTasksDir: 'grunt_tasks'
// global folder configuration
var options = {
config: {
src: "grunt_tasks/*.js"
paths: {
localDir: 'C:/inetpub/wwwroot/WEBSITE NAME EDIT ME/Website', // sitecore inetpub directory
localHost: 'LOCALHOST EDIT ME/',
// css paths
cssSrc: 'src/css',
cssDist: 'dist/css',
// scripts paths
jsSrc: 'src/scripts',
jsDist: 'dist/scripts',
jsTest: 'src/scripts/specs',
// image paths
imgSrc: 'src/images',
imgDist: 'dist/images',
// Sitecore modules
wffmSrc: 'src/css/modules/wffm', // src to webforms less file
wffmDist: 'sitecore modules/Shell/Web Forms for Marketers/Themes', // main sitecore modules directory
wffmCssFileName: 'wffm-example' // css file name output to sitecore modules folder
// Load grunt configurations automatically
var configs = require('load-grunt-configs')(grunt, options);
// Define the configuration for all the tasks
// Default task(s).
// Each task requires a folder to be added named "grunt_tasks", each task will run from that folder
// Task to compile web forms for marketers less file to css, auto-prefix, minify and move compiled file to sitecore inetpub directory
grunt.registerTask('wffm', ['less:wffm', 'postcss:wffm', 'cssmin:wffm', 'copy:wffm']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment