Install the npm dependencies by typing:
npm installCreate a .env.json file in the main directory, and fill it with your Github token data as follows:
{
"GITHUB_TOKEN": "[insert your gihub token here]"
}Fetch source code of the Handsontable PRO and CE and build the documentation:
npm run startIf you encounter the
Warning: ENOENT: no such file or directory, open 'generated/scripts/doc-versions.js' Use --force to continue.
problem, create a generated/scripts directory structure, by typing:
mkdir -p generated/scriptsThe documentation needs to be prepared with a valid directory structure to make static files accessible for the HTTP server.
handsontable-docs
├── 6.1.0
│ ├── ...
│ └── package.json
├── 6.0.0
│ ├── ...
│ └── package.json
└── next (this is a folder which can contain future documentation)After cloning the documentation, fetching the source code of the Handsontable and installing all dependencies you can use the
npm run buildcommand, to build the documentation without cloning the Handsontable repos.
To preview the documentation run docker-compose:
docker-compose -f docker/docker-compose.yml upBy default the documentation will be available at http://localhost:8085/docs/{your-docs-version}/tutorial-introduction.html.
Feature documentation can be shared under draft-next branch. To build this version it has to be cloned to the next directory and build using
npm run start -- --hot-version=6.1.0 # Handsontable version which will be used to build API RefAfter all, it is necessary to rebuild templates to use valid paths to assets (as /docs/next/...) by executing
npm run build:next