Skip to content

Commit

Permalink
Grunt Customization Template (#1535)
Browse files Browse the repository at this point in the history
- Adds a mechanism for defining local Grunt tasks.
  • Loading branch information
Chris Hallberg authored Mar 13, 2020
1 parent 9972e86 commit a7284d6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.vagrant
.vscode/*
/downloads
/Gruntfile.local.js
/solr/vendor
/vendor
ChangeLog
Expand Down
9 changes: 7 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
module.exports = function(grunt) {
require('jit-grunt')(grunt); // Just in time library loading
const fs = require("fs");

// Local custom tasks
if (fs.existsSync("./Gruntfile.local.js")) {
require("./Gruntfile.local.js")(grunt);
}

var fs = require('fs');
require('jit-grunt')(grunt); // Just in time library loading

function getLoadPaths(file) {
var config;
Expand Down
5 changes: 5 additions & 0 deletions Gruntfile.local.js.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = function(grunt) {
grunt.registerTask("custom", function customFunc() {
grunt.log.writeln("Hello world!");
});
}

0 comments on commit a7284d6

Please sign in to comment.