# API
Ungic has an API with which you can get the generated project styles, etc.
Api is located at the link http://{address}/ungic/
.
{address} is the address of the server on which the project was launched.
# font-icons
Usage:
http://{address}/ungic/font-icons
Get generated font icon styles.
<link rel="stylesheet" href="http://127.0.0.1:2020/ungic/font-icons">
WARNING
These styles are generated only if the icons plugin generates svg icons in fonts mode and has .png / .jpg icons.
# sprites
Usage:
http://{address}/ungic/sprites
Get generated sprites styles.
<link rel="stylesheet" href="http://127.0.0.1:2020/ungic/sprites">
WARNING
These styles are generated only if the icons plugin generates sprites and has .png / .jpg icons.
# pipe
Query:
- cids Optional String - ID`s of sass components separated by commas
- as Optional String - the name of the simulated html page
- silence Optional Boolean - don`t reload the page
- dir Optional Default: '' - may be ltr or rtl, sets the dir suffix to include styles
- timeout Optional Number - pause before page reloads
Usage:
It works like un-pipe tool but doesn't bind the current document to the resources used, but only simulating the binding of a specific project page, this is needed for:
- to include generated css styles of sass components
- automatic loading after resource changes (live reload)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <script src="http://127.0.0.1:2020/ungic/pipe?cids=app,grid&silence=true"></script> <script> document.addEventListener('ungic', e => console.log(e.detail)); </script> </head> <body> </body> </html>