This release mainly adds a bunch of functionality to the Javascript module. Stencils can now be written targeting a browser context in a similar way to those targeting R or Python contexts. Browser-based stencils have similar rendering functionality as those targeting other contexts, implementing the main directives such as exec
, text
, with
, for
, if
etc. They can request data (e.g. from an API) and render them when they are asynchronously returned. For example, here's a snippet of Cila for the core/stencils/index
stencil which powers the page at https://stenci.la based on our API:
for component in components
.component with component
a [target=_blank] attr href "/"+address
.head
.title text title
.address text address
.body
img.preview attr src address+"/preview.png"
Although the focus of this release is the Javascript module, there are other changes that improve the C++, Python and R packages (for a full list of commits for this release see here). At this stage, binaries are only provided for Linux 64-bit...
C++
Get the pre-compiled static library and header files at http://get.stenci.la/cpp/stencila-linux-x86_64-0.14.tar.gz
Python
Install the package for Python 2.7:
sudo pip install http://get.stenci.la/py/stencila-0.14-cp27-none-linux_x86_64.whl
R
Install the package for R 3.2:
wget http://get.stenci.la/r/complete/x86_64-pc-linux-gnu/3.2/stencila_0.14.tar.gz;
sudo R CMD INSTALL stencila_0.14.tar.gz
Docker
Docker images for Stencila on either Python and R (plus a bunch of "helpers" needed for some functionality) are also available at https://registry.hub.docker.com/repos/stencila/