Material-components-web: How to compile MDC-Web without NPM?

Created on 23 Jun 2018  路  6Comments  路  Source: material-components/material-components-web

Hello. I want to use MDCW without NPM. I don't need in all components, so I want to compile my own CSS and JS file. How I can do it?

Most helpful comment

Most likely because he doesn't want to bother with 15 different dependencies and the 13-page long "getting started" instructions. This is where MDL shines and MDC doesn't. MDL is simply way easier to incorporate: https://getmdl.io/started/index.html.

All 6 comments

There is not really a good way to download these without NPM. Although you could download them from github as a zipfile and import the files that way. Does that help?

The simplest way to use MDC Web's code without NPM would be to use the precompiled JS and CSS via unpkg. Each individual package is also available on unpkg (e.g. https://unpkg.com/@material/[email protected]/dist/mdc.button.min.css), but it's far more expedient from a development perspective to simply request the full bundle.

It may be feasible to download or clone the MDC Web repository and configure your toolchain to reference each package's Sass and ES2015 sources; however, it's not something we actively document or support, and NPM is by far the most straightforward way to consume individual MDC Web packages locally (as documented in the getting started guide).

Out of curiosity, why aren't you able to use NPM?

Given no further response, I'm going to close this, in hopes that we've answered your question.

I am still curious as to the background of your non-NPM usage, so if you get a chance to provide more info on that here, we're interested to hear it.

Most likely because he doesn't want to bother with 15 different dependencies and the 13-page long "getting started" instructions. This is where MDL shines and MDC doesn't. MDL is simply way easier to incorporate: https://getmdl.io/started/index.html.

Most likely because he doesn't want to bother with 15 different dependencies and the 13-page long "getting started" instructions.

Yes. Also I'm not using node.js in production.

MDL is simply way easier to incorporate

I'm using it now, but MDL is "lite" then I want to migrate on MDCW.

The simplest way to use MDC Web's code without NPM would be to use the precompiled JS and CSS via unpkg.

Ok, but how I can compile custom theme for MDC without NPM?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robzenn92 picture robzenn92  路  4Comments

kimurakenshi picture kimurakenshi  路  3Comments

ronnieroyston picture ronnieroyston  路  3Comments

cintaccs picture cintaccs  路  3Comments

jimyhdolores picture jimyhdolores  路  3Comments