Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 4 additions and 3 deletions.
  1. +4 −3 tasks/jsmin-sourcemap.js
View
7 tasks/jsmin-sourcemap.js
@@ -2,8 +2,9 @@ var jsmin = require('jsmin-sourcemap'),
path = require('path');
module.exports = function (grunt) {
grunt.registerMultiTask('jsmin-sourcemap', 'Generate minified JavaScript and sourcemap from files', function () {
+
// Grab the files to minify
- var file = this.file,
+ var file = this.files[0],
data = this.data,
cwd = data.cwd || '.',
srcFile = file.src,
@@ -39,7 +40,7 @@ module.exports = function (grunt) {
relDestDirPath = path.relative(destMapDir, destFileDir),
relMapPath = path.join(relMapDirPath, destMapName),
relDestPath = path.join(relDestDirPath, destFileName);
-
+
// Convert any '\\'s to '/'s (since we are URL based)
relMapPath = relMapPath.replace(/\\/g, '/');
relDestPath = relDestPath.replace(/\\/g, '/');
@@ -61,4 +62,4 @@ module.exports = function (grunt) {
grunt.file.write(destFile, code);
grunt.file.write(destMap, retObj.sourcemap);
});
-};
+};

No commit comments for this range

Something went wrong with that request. Please try again.