Opened 6 years ago

Closed 2 years ago

Last modified 2 years ago

#15112 closed bug (fixed)

update build system to use latest version of grunt

Reported by: Pirate Praveen Arimbrathodiyil Owned by: Michał Gołębiowski-Owczarek <[email protected]…>
Priority: minor Milestone: none
Component: [meta] ui.build Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description

We would like to build jquery ui in debian from the source repo. We already have grunt 1.0.1 in debian, but jquery-ui is using grunt 0.4.5. When we try to build jquery ui using grunt 1.0.1 , we get the following error,

$ grunt --verbose
Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Loading "Gruntfile.js" tasks...ERROR
>> TypeError: grunt.util._.pluck is not a function
>>   at expandFiles (/home/pravi/forge/debian/git/pkg-javascript/jqueryui/Gruntfile.js:95:22)
>>   at Object.module.exports (/home/pravi/forge/debian/git/pkg-javascript/jqueryui/Gruntfile.js:21:13)
>>   at loadTask (/usr/lib/nodejs/grunt/lib/grunt/task.js:318:10)
>>   at Task.task.init (/usr/lib/nodejs/grunt/lib/grunt/task.js:437:5)
>>   at Object.grunt.tasks (/usr/lib/nodejs/grunt/lib/grunt.js:111:8)
>>   at Object.module.exports [as cli] (/usr/lib/nodejs/grunt/lib/grunt/cli.js:27:9)
>>   at Object.<anonymous> (/usr/lib/nodejs/grunt-cli/bin/grunt:49:20)
>>   at Module._compile (module.js:409:26)
>>   at Object.Module._extensions..js (module.js:416:10)
>>   at Module.load (module.js:343:32)
>>   at Function.Module._load (module.js:300:12)
>>   at Function.Module.runMain (module.js:441:10)
>>   at startup (node.js:139:18)
>>   at node.js:974:3

Please make it possible to build jquery-ui using grunt 1.0.1

Change History (4)

comment:1 Changed 6 years ago by Pirate Praveen Arimbrathodiyil

This seems to be related to version of lodash (debian has 4.16.6) https://github.com/gruntjs/grunt-contrib-clean/issues/90

comment:2 Changed 6 years ago by Pirate Praveen Arimbrathodiyil

The following patch fixes this error

  • Gruntfile.js

    diff --git a/Gruntfile.js b/Gruntfile.js
    index be423b5..58a61ab 100644
    a b function mapMinFile( file ) { 
    9292}
    9393
    9494function expandFiles( files ) {
    95        return grunt.util._.pluck( grunt.file.expandMapping( files ), "src" ).map(function( values ) {
     95       return grunt.util._.map( grunt.file.expandMapping( files ), "src" ).map(function( values ) {
    9696               return values[ 0 ];
    9797       });
    9898}
    function createBanner( files ) { 
    129129               "<%= pkg.homepage ? '* ' + pkg.homepage + '\\n' : '' %>" +
    130130               (files ? "* Includes: " + fileNames.join(", ") + "\n" : "") +
    131131               "* Copyright <%= pkg.author.name %>;" +
    132                " Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */\n";
     132               " Licensed <%= _.map(pkg.licenses, 'type').join(', ') %> */\n";
    133133}
    134134
    135135grunt.initConfig({
Last edited 6 years ago by Ryan J Ollos (previous) (diff)

comment:3 Changed 2 years ago by Michał Gołębiowski-Owczarek <[email protected]…>

Owner: set to Michał Gołębiowski-Owczarek <[email protected]…>
Resolution: fixed
Status: newclosed

In a22361d:

Build: Update to the latest version of Grunt & many other packages

JSHint, JSCS & QUnit-related packages are not updated as they need more code
adjustments.

Fixes #15112
Closes gh-1882

Note: See TracTickets for help on using tickets.