Code Monkey home page Code Monkey logo

diagrams-doc's Introduction

Build Status

This repository holds all documentation for the diagrams framework, including

and more.

Building

To build the website (which includes the gallery, user manual, and tutorials), you will need:

Once you have all the dependencies, simply do

ghc --make Shake -threaded
./Shake +RTS -N4 -RTS preview

which will build the user manual and website, and run a web server on port 8000 serving a preview of the webiste. In place of -N4 you should use -NX where X is the number of cores you have. By default, the build system will use all but one of your available cores; if you wish to set the number to something else, set the DIA_DOC_THREADS environment variable.

Point your browser at localhost:8000 to view it. It works well to leave this invocation of Shake preview running, and then start another process calling Shake +RTS -NX -RTS build repeatedly in a loop. The website will now automatically be rebuilt any time any source files change.

For example, on a four-core Ubuntu machine, assuming you already have the Haskell Platform installed and want to use the rasterific backend, you could first clone the relevant diagrams repositories from github:

Then run the following commands:

sudo apt-get install python-docutils
cabal sandbox init
cabal install diagrams-core/ diagrams-solve/ diagrams-lib/ diagrams-rasterific/ diagrams-contrib/ diagrams-builder/ SVGFonts/ palette/ docutils/ shake hakyll safe
cabal exec bash
cd diagrams-doc
ghc --make Shake -threaded
./Shake +RTS -N4 -RTS preview

Building with diagrams-svg

The build system will first check for an installed diagrams-rasterific package. If none is found, it will fall back to using the diagrams-svg package. As of right now, there are no known issues with using diagrams-svg for building the website (other than the fact that some of the output .svg files are large).

diagrams-doc's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.