diff --git a/grunt/config/javascript.js b/grunt/config/javascript.js index 10cb5b79d..5645383e6 100644 --- a/grunt/config/javascript.js +++ b/grunt/config/javascript.js @@ -21,6 +21,12 @@ module.exports = function (grunt, options) { generateSourceMaps: true, preserveLicenseComments:false, optimize: 'none' + }, + //newer configuration + files: { + '<%= outputdir %>adapt/js/adapt.min.js': [ + '<%= sourcedir %>/**/*.js' + ] } }, compile: { diff --git a/grunt/config/less.js b/grunt/config/less.js index 634a4c0f6..879a31a29 100644 --- a/grunt/config/less.js +++ b/grunt/config/less.js @@ -21,6 +21,12 @@ module.exports = function (grunt, options) { filter: function(filepath) { return grunt.config('helpers').includedFilter(filepath); } + }, + //newer configuration + files: { + '<%= outputdir %>adapt/css/adapt.css': [ + '<%= sourcedir %>/**/*.less' + ] } }, compile: { diff --git a/grunt/tasks/diff.js b/grunt/tasks/diff.js new file mode 100644 index 000000000..1334a937b --- /dev/null +++ b/grunt/tasks/diff.js @@ -0,0 +1,17 @@ +/** +* For development +*/ +module.exports = function(grunt) { + grunt.registerTask('diff', 'Differential compile on a developer-friendly build of the course', [ + '_log-vars', + 'check-json', + 'copy', + 'newer:handlebars:compile', + 'create-json-config', + 'schema-defaults', + 'tracking-insert', + 'newer:javascript:dev', + 'newer:less:dev', + 'replace' + ]); +} diff --git a/package.json b/package.json index 8812f0e33..fa076a334 100644 --- a/package.json +++ b/package.json @@ -143,6 +143,7 @@ "grunt-contrib-watch": "~1.0.0", "grunt-jscs": "~2.8.0", "grunt-jsonlint": "~1.0.7", + "grunt-newer": "^1.2.0", "grunt-open": "~0.2.3", "grunt-replace": "~1.0.1", "jit-grunt": "~0.10.0",