Installation

This is the CaseFu installation documentation.

Prerequisites

To start using CaseFu, you will need the following:
  1. Node.js. Go for the latest LTS version. You may want to install it via a version manager, like NVM.
  2. A plain text file editor. vi (or Notepad) will do just fine, but you will enjoy an editor with support for Markdown and HTML syntax highlighting much more.

Project setup

  1. Create a new Node project (unless you already have one you can embed the FSD into):

    mkdir my-new-fsd
    cd my-new-fsd
    npm init
    

    and confirm (or answer) all the questions.

  2. Install the CaseFu CLI module:

    npm i casefu-cli --save-dev
    
  3. Add npm scripts. Add the following 2 rows into the scripts section of the package.json file:

    "scripts": {
      "build": "casefu build --sources fsd/**/*.md --target build/index.html",
      "serve": "casefu serve --sources fsd/**/*.md --target build/index.html --port 8080"
    }
    

    The parameters above contain the default values. You can either omit them if you are happy with the default values, or you can tweak them to your liking.

  4. Create an fsd sub-directory (or your custom one if you have changed the default --sources parameter), the first source file Overview.md within it and put the following into the file:

    # My new system
    

Building the FSD

To build the output FSD, execute:

npm run build

The FSD is then available at build/index.html.

Writing the FSD

To continuously re-build the FSD whenever any source file changes, execute:

npm run serve

Then open a browser window and navigate to the URL given at the terminal.

As you write into the files in the fsd/ directory and save a file, the FSD output in the browser gets automatically refreshed.