项目原始demo,不改动
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
Questo repository è archiviato. Puoi vedere i file e clonarli, ma non puoi effettuare richieste di pushj o aprire problemi/richieste di pull.
 
 
 
 

38 righe
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. });