11# Development setup
22
3- This site uses [ VuePress ] ( https://v1.vuepress.vuejs.org / ) as static page generator. It is a static page generator based
3+ This site uses [ VitePress ] ( https://vitepress.dev / ) as static page generator. It is a static page generator based
44on [ Vue.js] ( https://vuejs.org/ ) and created to write the documentation of that framework.
55
6- VuePress is based on markdown files. Each HTML-page on the site has a corresponding markdown file in this repository.
6+ VitePress is based on markdown files. Each HTML-page on the site has a corresponding markdown file in this repository.
77
88# Requirements and recommended tools
99
1010The following tools are required to build and develop the site.
1111
12- - NodeJS (latest LTS) and the corresponding version of ` npm `
12+ - Node.js (latest LTS) and the corresponding version of ` npm `
1313
1414The following tools will help you developing
1515
@@ -24,25 +24,23 @@ The following tools will help you developing
2424After cloning the repository you probaby want to run the following commands:
2525
2626- ` npm install ` (required) installs the dependencies libraries and is required for building the site.
27- - ` npm run dev ` runs a webpack -dev-server, usually on port 8080 . This server features live-reloading. Styles will
27+ - ` npm run docs: dev ` runs a vite -dev-server. This server features live-reloading. Styles will
2828 automatically be updated when you change the source files. Changes in markdown changes and Vue.js components will be
29- visible immediately. _ Note that changes to the file ` src/.vuepress /config.js ` are not part of the live-reload and
29+ visible immediately. _ Note that changes to the file ` src/.vitepress /config.js ` are not part of the live-reload and
3030 require a restart of the command._
31- - ` npm run preview ` should be run prior to creating a pull-request. It will clean the build-directories, run tests and
31+ - ` npm run docs: preview ` should be run prior to creating a pull-request. It will clean the build-directories, run tests and
3232 linters, the site. A production-like preview of the site can be viewed at port 9080
3333
3434Other commands are not needed as often:
3535
3636- ` npm run fix ` trys to fix all ` eslint ` errors and runs ` prettier ` to format everything. This is also done in a
3737 pre-commit hook so it should not be necessary to run this command manually.
38- - ` npm run clean ` removes all cached and built files. This can be helpful if you have errors that you cannot explain and
39- that just won't go away.
40- - The scripts ` test ` ,` lint ` , ` format ` and ` build ` just exist to make the other commands in the ` package.json ` more
38+ - The scripts ` test ` ,` lint ` , ` format ` and ` docs:build ` just exist to make the other commands in the ` package.json ` more
4139 readable.
4240
4341## Differences between dev-server and production
4442
45- The VuePress site is a Vue.js application. While the dev-server runs the whole application in the browser, the
43+ The VitePress site is a Vue.js application. While the dev-server runs the whole application in the browser, the
4644production site is pre-rendered with subsequent changes running in the browser.
4745
4846Vue.js components that only work in the browser will work correctly in the dev-server, but will fail in production.
@@ -60,24 +58,13 @@ A few notes on the site and the build processes
6058
6159The ` src ` folder contains all sources of the page. That includes
6260
63- - ` src/**/*.md ` : Markdown files, one for each HTML files containing the actual content.
64- - ` src/.vuepress/styles ` : [ stylus] ( http://stylus-lang.com/ ) files that adjust the CSS styles of the website (TODO add
65- documentation link)
66- - ` src/.vuepress/components ` : custom Vue.js components and Layouts created for this site (TODO add documentation link)
67- - ` src/.vuepress/public/ ` : root directory for public files that are copied to the site as-is.
68- - ` src/.vuepress/plugins/ ` : VuePress-plugins created for this site.
61+ - ` src/**/*.md ` : Markdown files, one for each HTML files containing the actual content
62+ - ` src/.vitepress/styles ` : CSS files that adjust the styles of the website
63+ - ` src/.vitepress/components ` : custom Vue.js components and Layouts created for this site
64+ - ` src/.vitepress/public/ ` : root directory for public files that are copied to the site as-is
65+ - ` src/.vitepress/plugins/ ` : VitePress-plugins created for this site
6966
7067# Deployment
7168
72- The deployment has two phases:
73-
74- - The preview site at https://handlebars-draft.knappi.org is automatically updated when changes are pushed to the
75- ` master ` -branch. The Github-pages are hosted in the ` gh-pages ` -branch of this repository.
76- - The production site (currently the temporary site https://handlebars-prod.knappi.org ) is updated when changes are
77- pushed to the ` production ` -branch. The Github-pages for the production site are hosted in the ` master ` -branch of the
78- [ docs-prod-ghpages] ( https://github.com/handlebars-lang/docs-prod-ghpages ) repository.
79-
80- In both cases, the deployment itself is performed via [ Travis-CI job] ( https://travis-ci.org/handlebars-lang/docs )
81-
82- The Travis-CI job uses the [ handlebars-site-bot] ( https://github.com/handlebars-site-bot ) account to update the
83- github-pages of this repository.
69+ The site at https://handlebarsjs.com is automatically updated when changes are pushed to the
70+ ` master ` -branch. The Github-pages are hosted in the ` gh-pages ` -branch of this repository.
0 commit comments