-
-
Save Phoen1x84/3f08677368b5f52e4b8411b8f3b6b63a to your computer and use it in GitHub Desktop.
Sitecore Web Forms for Marketers Gruntfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gruntfile configuration v0.0.1 | |
module.exports = function (grunt) { | |
// load nod tasks from package.json | |
require('load-grunt-tasks')(grunt); | |
// show timing of build tasks | |
require('time-grunt')(grunt); | |
// just in time load tasks / faster task running times | |
require('jit-grunt')(grunt)({ | |
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 | |
grunt.initConfig(configs); | |
// 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