[wp-trac] [WordPress Trac] #26615: Validate compiled and compressed JS using grunt
WordPress Trac
noreply at wordpress.org
Sun Jan 19 11:41:03 UTC 2014
#26615: Validate compiled and compressed JS using grunt
--------------------------+------------------------------
Reporter: jorbin | Owner: wonderboymusic
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Build Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Comment (by TobiasBg):
Besides what I mentioned above, this also tries to validate JS files in
npm modules of plugins in `wp-content` (e.g. if they also use `grunt`) --
which results in errors like
{{{
>> Line 2: Unexpected token :
Validating build/wp-content/plugins/<my_plugin_slug>/node_modules/grunt-
contrib-csslint/node_modules/csslint/cli.js
}}}
Thus, we should exclude `wp-content` here (for which I uploaded a patch).
(Drawback: Core themes would aso be exlcuded.)
Other options could be to just `jsvalidate` `.min.js` files (which is what
this ticket was intended for, I think), although that would also check
`.min.js` files in plugins.
An even better solution might be to check just the files that were created
by `uglify`. My tries with `<%= uglify.core.dest %>` failed however.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26615#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list