1rosehip / jplist

jPList jQuery Data Grid Controls is a flexible jQuery plugin for sorting, pagination and filtering of any HTML structure (DIVs, UL/LI, tables, etc).
http://jplist.com
Other
436 stars 177 forks source link

Compile fails with "--process_jquery_primitives" is not a valid option #264

Closed mistyn8 closed 7 years ago

mistyn8 commented 7 years ago

installed latest version of npm4.6.1 cloned repo

npm control prompt with admin access on windows 10 navigated to jplist root

npm install Completes then... try to compile any addon or the core I get an error.....


G:\repositories\jplist>npm run jscore -- --verb

jplist@5.2.0 jscore G:\repositories\jplist
node ./build/closure/rebuild-js.js src/core/js/config.json "--verb"

"--process_jquery_primitives" is not a valid option



Any pointers greatly appreciated.
1rosehip commented 7 years ago

Please comment out line 60 in compile.js file:

https://github.com/1rosehip/jplist/blob/master/build/closure/compile.js

mistyn8 commented 7 years ago

thanks for the swift reply..

now getting

> node ./build/closure/rebuild-js.js src/core/js/config.json "--verb"

src/core/js/app.js:143: WARNING - Property toArray never defined on this
                        return this.toArray();
                                    ^^^^^^^

src/core/js/app/dto/dto-mapper-service.js:37: WARNING - Property and never defined on Object
            ,status.data.and
                         ^^^

src/core/js/app/dto/dto-mapper-service.js:38: WARNING - Property or never defined on Object
            ,status.data.or
                         ^^

src/core/js/domain/dom/collections/dataitems.js:28: WARNING - Property filterType never defined on Object
                                filterService = jQuery.fn.jplist.DTOMapperService.filters[status.data.filterType];
                                                                                                      ^^^^^^^^^^

src/core/js/domain/dom/models/dataitem.js:52: WARNING - Property addBack never defined on ?
                        $element = context.$item.find(path.jqPath).addBack(path.jqPath);
                                                                   ^^^^^^^

src/core/js/domain/dom/services/filters/rangeFilter.js:20: WARNING - Redeclared variable: min
            ,min
             ^^^

src/core/js/domain/dom/services/filters/rangeFilter.js:21: WARNING - Redeclared variable: max
            ,max
             ^^^

src/core/js/domain/dom/services/filters/text-filters/advanced-search.js:8: WARNING - Bad type annotation. expected closing } See https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation for more information.
     * @param {string] ignoreRegex
                     ^

src/core/js/domain/dom/services/filters/text-filters/advanced-search.js:8: WARNING - Bad type annotation. expecting a variable name in a @param tag. See https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation for more information.
     * @param {string] ignoreRegex
                     ^

src/core/js/domain/dom/services/filters/text-filters/advanced-search.js:33: WARNING - assignment
found   : (Object|null)
required: string
                    tree.nodes[i] = scan(part, operators, operatorsIndex + 1);
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/core/js/domain/dom/services/filters/text-filters/advanced-search.js:33: WARNING - Function scan: called with 3 argument(s). Function requires at least 4 argument(s) and no more than 4 argument(s).
                    tree.nodes[i] = scan(part, operators, operatorsIndex + 1);
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/core/js/domain/dom/services/filters/text-filters/advanced-search.js:37: WARNING - Function scan: called with 3 argument(s). Function requires at least 4 argument(s) and no more than 4 argument(s).
                return scan(pattern, operators, operatorsIndex + 1);
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/core/js/domain/dom/services/filters/text-filters/advanced-search.js:109: WARNING - actual parameter 1 of String.prototype.indexOf does not match formal parameter
found   : Object
required: (null|string)
            contains = input.indexOf(tree) !== -1;
                                     ^^^^

src/core/js/domain/dom/services/filters/text-filters/text-filter-by-path.js:72: WARNING - actual parameter 4 of jQuery.fn.jplist.FiltersService.advancedSearchParse does not match formal parameter
found   : (string|undefined)
required: (Array<string>|null|undefined)
                                                        if(jQuery.fn.jplist.FiltersService.advancedSearchParse(text1, text2, ignoreRegex, not, and, or)){
                                                                                                                                          ^^^

src/core/js/domain/dom/services/filters/text-filters/text-filter-by-path.js:72: WARNING - actual parameter 5 of jQuery.fn.jplist.FiltersService.advancedSearchParse does not match formal parameter
found   : (string|undefined)
required: (Array<string>|null|undefined)
                                                        if(jQuery.fn.jplist.FiltersService.advancedSearchParse(text1, text2, ignoreRegex, not, and, or)){
                                                                                                                                               ^^^

src/core/js/domain/dom/services/filters/text-filters/text-filter-by-path.js:72: WARNING - actual parameter 6 of jQuery.fn.jplist.FiltersService.advancedSearchParse does not match formal parameter
found   : (string|undefined)
required: (Array<string>|null|undefined)
                                                        if(jQuery.fn.jplist.FiltersService.advancedSearchParse(text1, text2, ignoreRegex, not, and, or)){
                                                                                                                                                    ^^

src/core/js/domain/dom/services/sort/sort-api.js:33: WARNING - actual parameter 1 of jQuery.fn.jplist.PathModel does not match formal parameter
found   : (string|undefined)
required: (null|string)
        paths = [new jQuery.fn.jplist.PathModel(path, type)];
                                                ^^^^

src/core/js/ui/panel/control-factory.js:236: WARNING - Function jQueryObject.prototype.data: called with 0 argument(s). Function requires at least 1 argument(s) and no more than 2 argument(s).
        jQuery.each($control.data(), function(key, value) {
                    ^^^^^^^^^^^^^^^

src/core/js/ui/panel/control-factory.js:262: WARNING - parameter property does not appear in jQuery.fn.jplist.ControlFactory.getPropPath's parameter list
    jQuery.fn.jplist.ControlFactory.getPropPath = function(values, prop){
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^

src/core/js/ui/panel/controls-collection.js:389: WARNING - actual parameter 2 of jQuery.fn.jplist.ControlFactory.prototype.create does not match formal parameter
found   : (Object|null)
required: (jQuery.fn.jplist.ControlsCollection|null)
        control = controlFactory.create($control, context);
                                                  ^^^^^^^

0 error(s), 20 warning(s), 79.9% typed
mistyn8 commented 7 years ago

I tried updating build/closure/google-closure-compiler/externs/jquery-1.7.externs.js

to https://github.com/google/closure-compiler/blob/master/contrib/externs/jquery-1.7.js which at least has the toArray() function, mentioned in the first error, defined in it.. but without any joy.

1rosehip commented 7 years ago

These are only warnings, they could be ignored.

mistyn8 commented 7 years ago

Ah, my bad.. couldn't see the minified files being created, so thought it wasn't building, but just looking in the wrong place.