portails/content/docs/prologue/commands.md

89 lines
1.1 KiB
Markdown
Raw Normal View History

2020-11-04 08:26:58 +01:00
---
title: "Commands"
2020-11-05 21:09:30 +01:00
description: "Doks comes with commands for most used tasks."
lead: "Doks comes with commands for most used tasks."
2020-11-04 08:26:58 +01:00
date: 2020-10-13T15:21:01+02:00
lastmod: 2020-10-13T15:21:01+02:00
draft: false
images: []
menu:
docs:
parent: "prologue"
weight: 030
toc: true
---
2020-11-05 21:09:30 +01:00
{{< alert icon="💡" text="You can change the commands in the scripts section of `./package.json`." >}}
2020-11-04 08:26:58 +01:00
## start
Start local development server:
```bash
2020-11-05 21:09:30 +01:00
npm run start
2020-11-04 08:26:58 +01:00
```
2020-11-05 21:09:30 +01:00
## lint
2020-11-04 08:26:58 +01:00
2020-11-05 21:09:30 +01:00
Check scripts, styles, and markdown for errors:
2020-11-04 08:26:58 +01:00
```bash
2020-11-05 21:09:30 +01:00
npm run lint
2020-11-04 08:26:58 +01:00
```
2020-11-05 21:09:30 +01:00
### scripts
Check scripts for errors:
2020-11-04 08:26:58 +01:00
```bash
2020-11-16 09:35:51 +01:00
npm run lint:scripts [-- --fix]
2020-11-04 08:26:58 +01:00
```
2020-11-05 21:09:30 +01:00
### styles
Check styles for errors:
2020-11-04 08:26:58 +01:00
```bash
2020-11-16 09:35:51 +01:00
npm run lint:styles [-- --fix]
2020-11-04 08:26:58 +01:00
```
2020-11-05 21:09:30 +01:00
### markdown
2020-11-04 08:26:58 +01:00
2020-11-05 21:09:30 +01:00
Check markdown for errors:
2020-11-04 08:26:58 +01:00
```bash
2020-11-16 09:35:51 +01:00
npm run lint:markdown [-- --fix]
2020-11-04 08:26:58 +01:00
```
## clean
Delete temporary directories:
```bash
2020-11-05 21:09:30 +01:00
npm run clean
2020-11-04 08:26:58 +01:00
```
2020-11-05 21:09:30 +01:00
## build
2020-11-04 08:26:58 +01:00
2020-11-05 21:09:30 +01:00
Build production website:
2020-11-04 08:26:58 +01:00
```bash
2020-11-05 21:09:30 +01:00
npm run build
2020-11-04 08:26:58 +01:00
```
2020-11-05 21:09:30 +01:00
### functions
2020-11-04 08:26:58 +01:00
2020-11-05 21:09:30 +01:00
Build Lambda functions:
2020-11-04 08:26:58 +01:00
```bash
2020-11-05 21:09:30 +01:00
npm run build:functions
2020-11-04 08:26:58 +01:00
```
2020-11-05 21:09:30 +01:00
### preview
2020-11-04 08:26:58 +01:00
2020-11-05 21:09:30 +01:00
Build production website including draft and future content:
2020-11-04 08:26:58 +01:00
```bash
2020-11-05 21:09:30 +01:00
npm run build:preview
2020-11-04 08:26:58 +01:00
```