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

Usage without Modernizr / build for Modernizr #17

Closed
CptMeatball opened this issue Feb 22, 2018 · 4 comments
Closed

Usage without Modernizr / build for Modernizr #17

CptMeatball opened this issue Feb 22, 2018 · 4 comments

Comments

@CptMeatball
Copy link

On of the deps of this project is Modernizr, which on itself is not a problem. But what features of Modernzir are used? I don't use Modernizr in my project, and I dpn't want to use the entire Modernzir build.

Alternatively, is there a way to use OffCanvas without Modernizr? I'm trying to use the normal minified files (not the pkgd ones), which throws an error

TypeError: e is undefined

@vmitsaras
Copy link
Owner

You need olny

  • prefixed
  • transitions
    ~5KB
// Grunt Config
{
  "crawl": false,
  "customTests": [],
  "dest": "/PATH/TO/modernizr-output.js",
  "tests": [
    "prefixed"
  ],
  "options": [
    "prefixed",
    "setClasses"
  ],
  "uglify": true
}

//Command Line Config
{
  "minify": true,
  "options": [
    "prefixed",
    "setClasses"
  ],
  "feature-detects": [
    "test/css/transitions"
  ]
}

In the pkgd are several necessary helper functions grunt/concat.js like:

@vmitsaras
Copy link
Owner

I'll drop the Modernizr Dependency
https://github.com/vmitsaras/js-utils/tree/drop-modernizr

@vmitsaras
Copy link
Owner

Hi @CptMeatball
can you confirm that this is working?

@CptMeatball
Copy link
Author

I can confirm that on our project js-offcanvas.pkgd.min.js works without modernizr.

Cheers mate! 🎉

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

No branches or pull requests

2 participants