it’sinstalledwhenNPMprintsitsinstallationpathtothecommandlinewindow,
andthecommandlinepromptreappears,asdepictedinFigure3.25.
Figure 3.25. Installing CSSO using Windows’ command prompt
Nowwe’rereadytominifyourCSS.
Minification with CSSO
TominifyCSSfiles,runthecssocommand,passingthenameofafileasanargu-
ment:
csso style.css
Thiswillperformbasiccompression.CSSOstripsunneededwhitespace,removes
superfloussemicolons,anddeletescommentsfromyourCSSinputfile.
Oncecomplete,CSSOwillprinttheoptimizedCSStostandardoutput,meaning
thecurrentterminalorcommandpromptwindow.Inmostcases,however,we’ll
wanttosavethatoutputtoafile.Todothat,passasecondargumenttocsso―the
name of the minified file. For example, if we wanted to save the minified version
of style.cssasstyle.min.css,we’dusethefollowing:
118 CSS Master