usethesource / salix-core

Salix (core)
BSD 2-Clause "Simplified" License
3 stars 2 forks source link

add screenshots to demos #5

Open jurgenvinju opened 1 year ago

jurgenvinju commented 1 year ago

Adding screenshots is a matter of using rascal-shell blocks with webapps in them:

```rascal-shell
rascal>import salix::demo::basic::Counter;
ok
rascal>counterWebApp()
ok


<img width="387" alt="image" src="https://user-images.githubusercontent.com/1990295/215057834-fc7e97b9-7c95-4245-89e1-1a33d51de83e.png">
jurgenvinju commented 1 year ago

To enable preview of the screenshots you should install chrome and chromedriver and provide the right -D options as in .github/workflows/:

-Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -Dwebdriver.chrome.browser=`which chrome`

But you can also leave it to the github action to do this just in time before the publication of the docs. Without the -D stuff the docs simply skip the generation of screenshots and they are not there in the html either as a result.