var assert = require("assert"); var UglifyJS = require("../.."); describe("Input file as map", function() { it("Should accept object", function() { var jsMap = { '/scripts/foo.js': 'var foo = {"x": 1, y: 2, \'z\': 3};' }; var result = UglifyJS.minify(jsMap, {sourceMap: true}); var map = JSON.parse(result.map); assert.strictEqual(result.code, 'var foo={x:1,y:2,z:3};'); assert.deepEqual(map.sources, ['/scripts/foo.js']); assert.strictEqual(map.file, undefined); result = UglifyJS.minify(jsMap); assert.strictEqual(result.map, undefined); result = UglifyJS.minify(jsMap, {sourceMap: {filename: 'out.js'}}); map = JSON.parse(result.map); assert.strictEqual(map.file, 'out.js'); }); it("Should accept array of strings", function() { var jsSeq = [ 'var foo = {"x": 1, y: 2, \'z\': 3};', 'var bar = 15;' ]; var result = UglifyJS.minify(jsSeq, {sourceMap: true}); var map = JSON.parse(result.map); assert.strictEqual(result.code, 'var foo={x:1,y:2,z:3},bar=15;'); assert.deepEqual(map.sources, ['0', '1']); }); it("Should correctly include source", function() { var jsMap = { '/scripts/foo.js': 'var foo = {"x": 1, y: 2, \'z\': 3};' }; var result = UglifyJS.minify(jsMap, {sourceMap: {includeSources: true}}); var map = JSON.parse(result.map); assert.strictEqual(result.code, 'var foo={x:1,y:2,z:3};'); assert.deepEqual(map.sourcesContent, ['var foo = {"x": 1, y: 2, \'z\': 3};']); }); }); t type='hidden' name='id' value='c135d9747e3d1735ec4cf202470ba0f353145fea'/>
path: root/gnu/packages/autogen.scm
AgeCommit message (Expand)Author
2023-04-11gnu: autogen: Fix build on i686....* gnu/packages/autogen.scm (autogen): Add a snippet. Signed-off-by: Andreas Enge <andreas@enge.fr> Kaelyn
2022-06-13gnu: autogen: Build reproducibly....* gnu/packages/autogen.scm (autogen)[arguments]: Add 'use-numeric-ids-in-tarball phase. Vagrant Cascadian
2022-06-13gnu: autogen: Build with guile 3.0....* gnu/packages/autogen.scm (autogen)[arguments]: Add 'support-guile-3.0 phase. [inputs]: Remove guile-2.2 and add guile-3.0. Vagrant Cascadian
2022-06-05gnu: autogen: Use reproducible date for man pages....* gnu/packages/autogen.scm (autogen)[arguments]: Add 'set-man-page-date phase. Vagrant Cascadian
2022-02-11gnu: autogen: Fix compilation....* gnu/packages/autogen.scm (autogen)[source]: Add 'modules' and 'snippet'. Ludovic Courtès
2021-12-13gnu: Simplify package inputs....This commit was obtained by running: ./pre-inst-env guix style without any additional argument. Ludovic Courtès
2020-04-13gnu: autogen: Disable parallel tests....* gnu/packages/autogen.scm (autogen)[arguments]: Add #:parallel-tests?. Marius Bakke
2019-02-24gnu: autogen: Update to 5.18.16....* gnu/packages/autogen.scm (autogen): Update to 5.18.16. [inputs]: Update to guile-2.2. [arguments]: Add ‘--disable-dependency-tracking’ to #:configure-flags. Re-indent. Tobias Geerinckx-Rice