grunt-rollup
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -11,2 +11,4 @@ /* | ||
var path = require('path'); | ||
module.exports = function(grunt) { | ||
@@ -43,2 +45,3 @@ | ||
sourceMap: true, | ||
sourceMapFile: path.resolve('tmp/source_map.js'), | ||
banner: '// Top', | ||
@@ -53,3 +56,4 @@ footer: '// Bottom' | ||
options: { | ||
sourceMap: 'inline' | ||
sourceMap: 'inline', | ||
sourceMapFile: path.resolve('tmp/source_map_inline.js'), | ||
}, | ||
@@ -56,0 +60,0 @@ files: { |
{ | ||
"name": "grunt-rollup", | ||
"description": "Grunt plugin for rollup - next-generation ES6 module bundler", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"homepage": "https://github.com/chrisprice/grunt-rollup", | ||
@@ -23,3 +23,4 @@ "author": { | ||
"scripts": { | ||
"test": "grunt test" | ||
"test": "grunt test", | ||
"ci": "npm run test" | ||
}, | ||
@@ -41,4 +42,4 @@ "devDependencies": { | ||
"promise": "^7.0.4", | ||
"rollup": "^0.15.0" | ||
"rollup": "^0.16.3" | ||
} | ||
} |
# grunt-rollup | ||
[![Build Status](https://travis-ci.org/chrisprice/grunt-rollup.svg)](https://travis-ci.org/chrisprice/grunt-rollup) | ||
[![dependencies](https://david-dm.org/chrisprice/grunt-rollup.svg)](https://david-dm.org/chrisprice/grunt-rollup) | ||
@@ -3,0 +5,0 @@ > Grunt plugin for [rollup](https://github.com/rollup/rollup) - next-generation ES6 module bundler |
@@ -13,2 +13,3 @@ /* | ||
var rollup = require('rollup'); | ||
var path = require('path'); | ||
@@ -73,3 +74,5 @@ module.exports = function(grunt) { | ||
if (options.sourceMap === true) { | ||
grunt.file.write(f.dest + '.map', result.map.toString()); | ||
var sourceMapOutPath = f.dest + '.map'; | ||
grunt.file.write(sourceMapOutPath, result.map.toString()); | ||
code += "\n//# sourceMappingURL=" + path.basename(sourceMapOutPath); | ||
} else if (options.sourceMap === "inline") { | ||
@@ -76,0 +79,0 @@ code += "\n//# sourceMappingURL=" + result.map.toUrl(); |
@@ -1,3 +0,3 @@ | ||
var foo = {}; | ||
var bar = {}; | ||
console.log(foo); | ||
console.log(bar); |
// Top | ||
var foo = {}; | ||
var bar = {}; | ||
console.log(foo); | ||
// Bottom | ||
console.log(bar); | ||
// Bottom | ||
//# sourceMappingURL=source_map.js.map |
@@ -7,5 +7,3 @@ 'use strict'; | ||
var actualContents = grunt.file.read(actual); | ||
var expectedContents = grunt.file.read(expected) | ||
// see https://github.com/rollup/rollup/issues/125 | ||
.replace(/\{cwd\}/ig, process.cwd().replace(/\\/ig, "/")); | ||
var expectedContents = grunt.file.read(expected); | ||
@@ -41,10 +39,8 @@ test.equal(actualContents, expectedContents, msg); | ||
// need https://github.com/rollup/rollup/issues/125 | ||
// to compare with expected | ||
var output = grunt.file.read("tmp/source_map_inline.js"); | ||
assertFilesSame(test, 'tmp/source_map_inline.js', | ||
'test/expected/source_map_inline.js', | ||
'should describe behaviour with sourcemap inline.'); | ||
test.ok(Boolean(output.match(/\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,/))); | ||
test.done(); | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11055
15
189
64
+ Addedrollup@0.16.4(transitive)
- Removedrollup@0.15.0(transitive)
Updatedrollup@^0.16.3