Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customTests not working with Modernizr v3 #22

Open
joelambert opened this issue Nov 2, 2015 · 12 comments
Open

customTests not working with Modernizr v3 #22

joelambert opened this issue Nov 2, 2015 · 12 comments

Comments

@joelambert
Copy link

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?

@PaulTondeur
Copy link

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

@strarsis
Copy link

strarsis commented Dec 3, 2015

+1!

@zolotykh
Copy link

zolotykh commented Dec 3, 2015

Have this problem too.

@strarsis
Copy link

strarsis commented Dec 3, 2015

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
Copy link

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

With best regards

@marten-seemann
Copy link

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

@strarsis
Copy link

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?

@marten-seemann
Copy link

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?

@ruanmer
Copy link

ruanmer commented Feb 2, 2016

+1

3 similar comments
@ctjhoa
Copy link

ctjhoa commented Mar 16, 2016

+1

@thiberaw
Copy link

+1

@signal-intrusion
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants