项目原始demo,不改动
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
Tento repozitář je archivovaný. Můžete prohlížet soubory, klonovat, ale nemůžete nahrávat a vytvářet nové úkoly a požadavky na natažení.
 
 
 
 

38 řádky
654 B

  1. /*
  2. * This example targets Node 4 and up.
  3. */
  4. const cssnano = require('cssnano');
  5. /*
  6. * Add your CSS code here.
  7. */
  8. const css = `
  9. h1 {
  10. color: #ff0000;
  11. font-weight: bold;
  12. }
  13. `;
  14. /*
  15. * Add your configuration here; see http://cssnano.co/options/ and
  16. * http://cssnano.co/optimisations/ for more details.
  17. *
  18. * For example you can turn off z-index rebasing by setting `zindex: false`
  19. * in your config, or you can use `safe: true` which will turn off unsafe
  20. * optimisations.
  21. */
  22. const opts = {
  23. };
  24. /*
  25. * Compress the CSS asynchronously and log it to the console.
  26. */
  27. cssnano.process(css, opts).then(result => {
  28. console.log(result.css);
  29. });