Document required node version (#789)

After trying to set up the project, I found that Node 16 is incompatible with the pinned version of node-sass, and node 15 must be used. This PR documents the requirement - perhaps an upgrade to Node 16 can be done after.
This commit is contained in:
Adam Johnson 2022-02-04 17:53:13 +00:00 committed by GitHub
parent 0ea321ea58
commit defbb40bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 11 deletions

View File

@ -74,20 +74,25 @@ keep the core htmx code tidy
### hacking guide
to develop htmx locally, you will need to install the development dependencies:
To develop htmx locally, you will need to install the development dependencies.
Use node 15 and run:
* `npm install`
```
npm install
```
and then run a web server in the root (easiest with python):
Then, run a web server in the root.
This is easiest with Python:
* `python3 -m http.server
`
```
python3 -m http.server
```
you can then run the test suite by navigating to:
You can then run the test suite by navigating to:
<http://0.0.0.0:8000/test/>
at this point you can modify `/src/htmx.js` to add features, and then add tests in the appropriate area under `/test`
At this point you can modify `/src/htmx.js` to add features, and then add tests in the appropriate area under `/test`.
* `/test/index.html` - the root test page from which all other tests are included
* `/test/attributres` - attribute specific tests

View File

@ -1,10 +1,13 @@
## Running The Website Locally
The htmx.org website is built on [eleventy](https://www.11ty.dev/). To run the site, run
The htmx.org website is built on [eleventy](https://www.11ty.dev/).
To run the site, use node 15 and run:
* `npm install`
* `npx eleventy --serve`
```
npm install
npx eleventy --serve
```
The site should then be available at <http://localhost:8080>
**macOS 64-bit users may need to run `npm rebuild node-sass` to get the documentation site working.**
**macOS 64-bit users may need to run `npm rebuild node-sass` to get the documentation site working.**