customizr icon indicating copy to clipboard operation
customizr copied to clipboard

customTests not working with Modernizr v3

Open joelambert opened this issue 9 years ago • 12 comments

I don't seem to be able to get the customTests option to be able to work.

TypeError: Cannot read property 'replace' of undefined
    at /Users/joelambert/Projects/Misc/primer-rareloop/node_modules/grunt-modernizr/node_modules/customizr/node_modules/modernizr/lib/build-query.js:22:22

I've had a bit of a look and it seems that the v3 version of Modernizr expects all tests to be from the core repository. Might it be better for Customizr to append the contents of files in the customTests array to the file produced by the Modernizr build script rather than trying to pass them through?

joelambert avatar Nov 02 '15 16:11 joelambert

Same problem here. For the custom tests no meta data is generated and therefor it is failing to build.

PaulTondeur avatar Nov 27 '15 14:11 PaulTondeur

+1!

strarsis avatar Dec 03 '15 01:12 strarsis

Have this problem too.

zolotykh avatar Dec 03 '15 09:12 zolotykh

Either Modernizr adds a means for adding custom tests by a file path to their new v3.x API (https://github.com/Modernizr/Modernizr/blob/master/lib/config-all.json) or this module (customizr) has to add them on top of Modernizr.

strarsis avatar Dec 03 '15 12:12 strarsis

Any plans on how to add this missing sub-feature?

With best regards

strarsis avatar Dec 22 '15 23:12 strarsis

Wouldn't it just be possible to concat the custom tests to the Modernizr file?

marten-seemann avatar Dec 27 '15 20:12 marten-seemann

Modernizr build seems to also do other things with the test files, like stripping comments, etc. and it uses requirejs which does more than just concatenating. Wouldn't this duplicate the build logic or lead to different results than a normal Modernizr test?

strarsis avatar Dec 27 '15 23:12 strarsis

Well, I haven't looked into this in detail, but I guess as a workaround I could just concat the Modernizr file with my own tests and everything will work fine, right?

marten-seemann avatar Dec 28 '15 09:12 marten-seemann

+1

ruanmer avatar Feb 02 '16 17:02 ruanmer

+1

ctjhoa avatar Mar 16 '16 21:03 ctjhoa

+1

thiberaw avatar Mar 18 '16 17:03 thiberaw

+1

signal-intrusion avatar Apr 06 '16 16:04 signal-intrusion