CSS & JS Processing Flow
Zesty.io runs CSS pre-processers on save and publish of SASS, SC SS, LESS, and CSS files. We also concatenate JS files.
Zesty.io’s Code Editor supports CSS, LESS, and SCSS/SASS. Every save of a stylesheet will combine, compile, and minify all stylesheet files into a single CSS file
/site.css. That file is automatically linked to in your page <head>. If more than one style of stylesheet is used, they will compile and concat into a single file. The order of concatenation:
All files are concatenated based on their type then by their order set in the editor interface of the Zesty.io manager. Each stylesheet type has its own compiler or minifier explained below.
All LESS files are concatenated based on their order in the editor interface and then run through the LESSC compiler with the compressed flag. The repository we use to compile: https://github.com/less/less.js
Errors are returned for broken LESS at compile time.
All SCSS files are concatenated based on their order in the editor and run through the SASSC compiler with the flags ‘ --style compressed --stdin’, that behavior is hard coded and cannot be changed. The repository used for compiling SASS: https://github.com/sass/sassc
The command to compile SCSS to CSS is `sassc --stdin --style compressed`
The command to compile SASS to CSS is `sassc --stdin --sass --style compressed`
Errors are returned for broken SASS at compile time.
Asset Directory Settings
A special setting with the values
key:base_directorymay be set to a base have your
site.jsfiles load from a specific directory like
/my/directory/site.jsthis is useful for launching sub directory specific website instances.
If a file is given the name ie8.css, it will be ignored by the minification process and be included in its own href link in the header after the main minified CSS file is added.
Zesty.io auto appends stylesheets to specific templates (mostly legacy). If you experience added CSS and it is a problem please reach out to support on the Zesty.io developer slack channel. Support engineers can remove the base CSS files.
Get Single Stylesheet
Get Multiple Stylesheets
Update Stylesheet and Publish
Zesty.io combines all script files into a single concatenated
/site.jsfile, this file automatically links in the head via script tag, and can optionally be omitted in developer settings on the instance.