Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Expose mdc-ripple's util.js for ES5 #253

@Hardtack

Description

@Hardtack

I'm implementing custom MDCRippleFoundation adapter.
As you mentioned in document, supportsCssVariables function in util.js would be useful to implement browserSupportsCssVars() => boolean.
But, @material/ripple/dist/mdc.ripple does not exposes the utils module. So I cannot use the module without transpiler configured for MDC.

/*
 * In `some_library/src/foo.js`
 * Will be transpiled to ES5 code in `some_library/lib/foo.js`
 */
import {supportsCssVariables} from '@material/ripple/util';

...

If i use transpiler to use that module, users of some_library also have to use same transpiler. But It does not seem to be good constraints.

/* In application that does not use any transpiler  */

// Raises syntax error when importing `@material/ripple/util`
var RippleWrapper = require('some_library/lib/foo.js'); 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions